Loading
Salesforce now sends email only from verified domains. Read More
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          disableDismiss and enableDismiss Functions

          disableDismiss and enableDismiss Functions

          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.

           
          Loading
          Salesforce Help | Article