I am using an object from a third party package, we'll call it
xyz__Obj__c, that has several fields, let's call them
xyz__C__c, that are percentages. The package then has a formula field, let's call it
xyz__Total__c that is the sum of these percentages (with a simple
xyz__A__c + xyz__B__c + xyz__C__c). This total must equal 100, which is checked in the third party package using a validation rule against
In our use case we don't care about these fields and wanted to create a simple autolaunched flow that, on creation of an
xyz__Obj__c record, simply sets the field
xyz__A__c value to the literal 100.
Unfortunately, it seems that field updates in flows don't cause re-evaluation of formula fields in the same record. I say this because the validation rule against
xyz__Total__c is being violated and we get the validation rule's message presented when trying to save a record created through the Salesforce UI.
We have tried:
- a flow: the validation rule is violated
- a process builder flow: the validation rule is violated
- a trigger: all is fine
According to the official documentation, flows are processed before triggers...
Anyone seen this before? If so, did you find a non-trigger solution? (The nice thing about flow-based automation is that even when packaged they can still be disabled on a subscriber org if a customer needs to do something different.)