Loading

Onclick JavaScript buttons in the Salesforce mobile app

Fecha de publicación: Oct 13, 2022
Descripción

Issue:

Onclick JavaScript buttons are not supported in the Salesforce mobile app (iOS and Android), although they are supported for use in the Classic UI desktop environment. Onclick JavaScript buttons are sometimes used to open a Visualforce page from a record detail page, or to call a Web service.

 
Solución

Workarounds to using onclick JavaScript button in Salesforce mobile app:

  • The best way to use an onclick JavaScript button would be to create a Visualforce page, and then use an apex:commandButton element to add the button.
  • Developers can then either embed the Visualforce page in the object's page layout, or add the Visualforce page to a quick action, to launch when it is tapped.
  • Here is some documentation on the apex:commandButton element. Click here for a code example that uses the apex:commandButton element, and how the Apex controller works with this element.
Número del artículo de conocimiento

000384337

 
Cargando
Salesforce Help | Article