function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Austin GutzAustin Gutz 

Automate a button click

Hi All,

We have a button on a record page that executes JavaScript. This triggers an integration that synces the record information to our ERP. Anytime a user makes an edit on the record they are supposed to click that button... that isn't alays happening.

I'm looking for a way to take the human eliment out of the button click. Is there a way to use process builder or workflow to click the button if the record it edited? 

Here is the JavaScript
{!REQUIRESCRIPT("/soap/ajax/12.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/12.0/apex.js")}
{!REQUIRESCRIPT("/support/console/10.0/integration.js")}
alert(sforce.apex.execute("CC_WebServices","promoteToShip",{ship:"{!Shipping_Address__c.Id}"}));

 
Raj VakatiRaj Vakati
You can perform the auto click of the button using jquery .. but i dnt have complete code 
 
{!REQUIRESCRIPT("/soap/ajax/43.0/connection.js")} 
{!REQUIRESCRIPT("/soap/ajax/43.0/apex.js")} 
{{!REQUIRESCRIPT('//code.jquery.com/jquery-2.0.3.min.js')}


var records = {!GETRECORDIDS($ObjectType.Account)}; 
if (records[0] == null) { 
 // Write Jquery logic to do it an Auto Click 
} 

 
}

 
Mohan Kalapuram 4Mohan Kalapuram 4
Hi


Any one have any idea how to auto click detail page button in salesforce?

Thanks
Mohan