Essentially my problem has 3 potential solutions, but I will start with the one I’d most like to learn about (the title).
Problem: My button has multiple actions, but the main ones in this situation are:
- There is a custom picklist for “Country Reassign”, which after being saved, will run a WF rule that updates the standard Country field to this new value (we would use the Country field if it was picklist, but it is String)
- Sets Lead Owner to “Holding Queue” - this will fire Apex code that assigns the lead to a specific queue and then user based on routing and assignment logic rules
- Sets my two custom picklists (a Yes/No and the above Country Reassign) to null, so they will be clear in case reassignment is needed (not too important, but would be nice), saves the model, and closes the popup where these fields are located
- Find a way to run the WF field update as part of my multiple actions (Apex code runs last)
- Make the reassignment a two step process (save the model and let all WF rules fire), then have another button that fires Apex (prefer not to do this, but I know it will work)
- Update the standard Country field with the custom “Country Reassign” value within Skuid and skip the WF rule (is there a way to do this without a JS snippet - Update Field and set the value to “Country_Reassign__c”? and also be able to clear the picklists AFTER they update the field)
Thanks and Happy New Year!