Dismiss functions control how the presentation player is closed and handled when users
select the Visit button. These functions execute long-term operations in the
'returntovisitbuttonpress' event handler.
Required Editions
Available in: Lightning Experience
Available in: Enterprise and Unlimited Editions with Life
Sciences Cloud, Life Sciences Cloud for Customer Engagement Add-on license, and the
Life Sciences Customer Engagement managed package.
This function is supported only in the Life Sciences Cloud mobile app.
PresentationPlayer.disableDismiss()
To prevent the presentation player from being dismissed immediately after the users select the
Visit button, call the PresentationPlayer.disableDismiss() function before
executing long-term database operations such as queries or upserts.
PresentationPlayer.enableDismiss()
To notify and dismiss the presentation player, call the
PresentationPlayer.enableDismiss() function after long-term operations are
finished. If PresentationPlayer.enableDismiss() isn’t called within 30 seconds,
the presentation player is dismissed automatically.
Usage
The PresentationPlayer.disableDismiss() and
PresentationPlayer.enableDismiss() functions control only the presentation
that’s open in the presentation player. The 'returntovisitbuttonpress' event is
also sent only to the presentation that’s currently open when users select the Visit button.
To save data from multiple presentations during one presentation session, users can select the
Visit button after presenting a custom presentation. The
'returntovisitbuttonpress' event is triggered for the current presentation,
and any upsert requests are executed. After opening the visit, users can use the Return to
Presentation link to return to the same presentation session.
Example
For example, a user opens a custom presentation in the presentation player. When a page is
opened, the PresentationPlayer.disableDismiss() function is called during the
'viewappearing' event to prevent the player from being dismissed while
long-running operations are in progress.
After the user finishes the presentation and selects the Visit button, the
'returntovisitbuttonpress' event is triggered, and the presentation executes
its long-running database operations, such as fetching or upserting data. Once these operations
are complete, the PresentationPlayer.enableDismiss() function is called to
close the presentation player.
Did this article solve your issue?
Let us know so we can improve!
Loading
Salesforce Help | Article
Cookie Consent Manager
General Information
Required Cookies
Functional Cookies
Advertising Cookies
General Information
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required Cookies
Always Active
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional Cookies
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising Cookies
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.