You are here:
Presentation Player Functions
You can include JavaScript code in the presentation ZIP file for Life Sciences Customer Engagement. These functions enable dynamic, interactive presentation content that can query data, navigate slides, update records, launch emails, start or stop tracking metrics, and embed surveys in presentation pages. When the JavaScript function is called during presentations, the action is performed in the presentation player.
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. |
These functions support touch-based interaction and navigation and are available only in the Life Sciences Cloud mobile app. They're not supported on the desktop site, which uses standard UI controls for navigation, such as buttons and arrows.
defineNoSwipeRegiondestroyNoSwipeRegion
All other functions listed are available in the Life Sciences Cloud mobile app and on the desktop site.
- alert Function
Opens an alert with the specified message in the presentation player. - createVisit Function
Creates a visit for the selected attendees and returns the result to the specified callback method. Salesforce applies all configured visit validations to the created visit. - defineNoSwipeRegion Function
Defines an area of the screen where the presentation player ignores the swipe gesture. This function enables field users to interact with dynamic content without interrupting the presentation or navigating accidentally. - destroyNoSwipeRegion Function
Removes the region ID of an area of the screen where the presentation player ignores the swipe gesture. - disableDismiss and enableDismiss Functions
Dismiss functions control how the presentation player is closed and handled when users select the Visit button. - fetchWithParams Function
Queries data that’s not already returned in Mustache variables, and returns results to the specified callback method. - getSurveyFlowJson Function
Searches for a survey and returns it in JSON format. Then, the presentation HTML can parse the survey and show it in the presentation player. - goNextPage Function
Goes to the next page in the presentation. If the current page is the last page in the presentation, nothing happens. - goPreviousPage Function
Goes to the previous page in the presentation. If the current page is the first page in the presentation, nothing happens. - goToSlide Function
Goes to the specified pages and assets within a presentation. - launchApprovedEmail Function
Opens the Send Email window with the email template that’s linked to the presentation page, if the presentation page specifies a template. If there’s no email template ID specified on the presentation page, the page isn't linked to a template. - launchEmails Function
Opens the Send Email window with the email templates that are available to the user. - logError Function
Logs error messages for any errors that occur within the presentation player. This function enables Salesforce admins to analyze and troubleshoot problems. - saveState Function
Saves data about the presentation’s state to the state property in the JSON that’s supplied to the presentation’s Mustache template. Stores the state on the user’s device so that users can resume a presentation and continue where they left off in the same session or a future session. - setSurveyFlowJson Function
Saves survey results to the database for the current presentation and visit when a field user saves or submits the related visit. - startTrackingPage Function
Starts tracking presentation metrics in a new presentation click stream entry record for the specified presentation page. - stopTrackingPage Function
Stops tracking presentation metrics for the current page. - updateFeedback Function
Sets the feedback from the healthcare professional (HCP) to the specified type on related provider visit detailing product message records. - upsert Function
Creates and updates records for the specified objects and returns results to the specified callback method.

