+ Start a Discussion
Sergio Mac IntoshSergio Mac Intosh 

Override SF1 App Cancel & Save button with javascript function

Hi,

How can i activate the save button on visualforce page in SF1App with my javascript method?

Is it also possible to change the text on the cancel button? Instead of cancel i would like to call it 'back'.

Regards,

Sergio
Best Answer chosen by Sergio Mac Intosh
bob_buzzardbob_buzzard
I assume you are talking about Salesforce1 actions based on Visualforce pages, as that is where you get those standard buttons.

You can interact with these buttons via the Sfdc.canvas.publisher JavaScript object. There's an introduction in the following Trailhead module that shows how to execute the button programmatically:

https://trailhead.salesforce.com/en/visualforce_mobile_salesforce1/visualforce_mobile_salesforce1_actions_object