Thursday, July 9, 2015
Salesforce Tips and Tricks: How to Convert a Lead in Use by a Time-Based Workflow in Salesforce
Salesforce, Salesforce Tips & Tricks, Tips & Tricks
Written by Chad Smith
Have you ever tried to convert a Lead, only to get the “Unable to convert lead that is in use by workflow” message? Annoying isn’t it?
1) Add a custom field like, “Cancel Time Based Workflow” to your Lead object.
2) Exclude any Lead from your workflow where that field is checked.
var newRecords = ;
var c = new sforce.SObject(“Lead”);
c.Cancel_Time_Based_Workflow__c = “TRUE”;
result = sforce.connection.update(newRecords);