Changes

Trigger a Workflow from a Custom Browser Script

89 bytes added, 12:06, 12 February 2014
order of function calls in the script needed to be updated to make it more universal
if("@My Field@"!="This value" && frm.123456.value=="This value")
{
_triggerwf('@opportunityid@',32123); // trigger the workflow before the alert so server has more time to complete the action.
alert("The workflow will now be triggered");
_triggerwf('@opportunityid@',32123);
}
return true;
* The function [[savefunc]] is run whenever a record is saved.
* The if statement will ensure that the workflow is only triggered when the ''My Field'' value is '''changed''' to ''This Value'', not every time the page is saved with with ''This Value''.
 
==Notes==
Smartstaff
173
edits