+ Start a Discussion
AmitabhleoAmitabhleo 

Workflow field update vs Process builder field update

Hi,
I used to have a small trick of deduping records. (This is not salesforce.com duplicate management as you cannot used it with two lookups)
  • create a Text  unique field 
  • Update the unique field using workflow by concatenating the ID's of 2 look up fields.
  • Hide this field on the page layout
  • This would give an error if I used a same relationship twice.
  • This worked fine using workflow.
  • When I created a same workflow using Process builder I could not get the below dupe error.
  • I would like to understand the difference between field updates of workflows and process builder
  • one thing i checked is that process builder returned 15 digit Id while workflow returned 18 digit id.
thanks in advance.
Amitabh
dupe check error

The Same error using Process Builder comes on my Email as:

UPDATE --- UPDATE FAILED --- ERRORS : (DUPLICATE_VALUE) duplicate value found: PriceBook_Entry_Unique__c duplicates value on record with id: a0728000001mXRM, 
 
Best Answer chosen by Amitabhleo
KK Ramamoorthy:-)KK Ramamoorthy:-)
Unlike workflow field updates, standard validations are not executed in the  same transactional unit when updated through process actions. That is why an error is not thrown on the screen. Please check the below links for more details 

https://help.salesforce.com/apex/HTViewHelpDoc?id=process_considerations_activation.htm&language=en_US

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_order_of_execution.htm

For now, you may have to stick with workflow for this requirement.