I recently came across an Issue when running a Test class. In my Test class I Insert a custom object. And by the time the record is inserted, there is a workflow rule to fire and populate the Id value to a custom field of the same object. This value will be later used in some other processing. (Please note that this field is an External Id, unique and case sensitive)
But looks like the workflow rule is not triggered and value is not getting updated. Any idea what could go wrong?
Here is the code I'm trying to execute,
Platform_Org__c org = new Platform_Org__c();
org.Name = 'Test org 3';
org.Parent_Account__c = '0018A000008LUFK';
And the WF Rule, i have to update the dup Id, Criteria evaluates on : Created and everytime its edited. Rule Criteria : Platform Org : Dup Id equals '' If the criteria matches the Dup Id will be default to Record Id