Loading

Onclick JavaScript Buttons Not Supported in Salesforce Mobile App

Udgivelsesdato: Jun 26, 2026
Beskrivelse

Onclick JavaScript buttons are not supported in the Salesforce Mobile App on iOS and Android devices, even though they function correctly in the Salesforce Classic desktop browser experience. Onclick JavaScript buttons are commonly used to open a Visualforce page from a record detail page, or to call an external web service. This article describes supported alternatives for replicating onclick JavaScript button functionality within the Salesforce Mobile App.

Løsning

Workarounds for Onclick JavaScript Buttons in the Salesforce Mobile App

The recommended approach is to replace an onclick JavaScript button with a Visualforce page backed by an Apex controller, and expose that page through the mobile app using one of the methods below.

  • Create a Visualforce page and use an apex:commandButton element to add the button functionality within the page.
  • Embed the Visualforce page directly in the object's page layout. The embedded page will be accessible in the Salesforce Mobile App.
  • Alternatively, add the Visualforce page to a Quick Action, which can be tapped in the mobile app to launch the page.
Vidensartikelnummer

000384337

 
Indlæser
Salesforce Help | Article