You need to sign in to do that
Don't have an account?
Robert Wynter
run javascript code in process builder
I have 2 custom buttons on my Accounts Object. The buttons have Javascript that tells the execution which Echosign Agreement template to use with the Account Object. I just created a process Builder for Contracts Object and I'd like to execute the templates within the PB. is there an example located someplace that someone can point me to. I was thinking since I can call apex in PB maybe there's an example out there that can help me figure this out. here is an example of the JS inside the custom button:
{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/20.0/apex.js")} if('{!Account.Original_Contract_Start__c}' == '' || '{!Account.Current_Contract_Start__c}' == '' || '{!Account.Contract_End__c}' == '' || '{!Account.Status__c}' != 'Active' ) { window.alert("Hello {!$User.FirstName} Please make sure you have entered the values in Contract End, Original Contract Start and Current Contract Start fields and that the Account Status is Active"); } else if('{!Account.Status__c}' == 'Active' && '{!Account.Approval_Progress__c}' == 'Closed Won') { window.open("/apex/echosign_dev1__AgreementTemplateProcess?masterid={!Account.Id}&templateId=a08o000000C6EDi ","_blank"); } else if('{!Account.Status__c}' == 'Active' && '{!Account.Approval_Progress__c}' == 'Approved') { window.open("/apex/echosign_dev1__AgreementTemplateProcess?masterid={!Account.Id}&templateId=a08o0000003aNJZ ","_blank"); }