I am trying to create Validation that fire only when someone try to update record manually but it should not get fire if changes due to Process/Apex/Flow

Any suggestion ?

Validation Rule :

AND(ISPICKVAL( Detail__c ,'Transfer - MM'),ISPICKVAL(Status__c ,'Closed'))

| improve this question | | | | |

Validation Rules cannot distinguish between manual entry by some user and changes made by Apex triggers, workflow rules, processes, and API sessions which are running as that user, per se.

You can configure your automation to also set some hidden field Checkbox__c when it makes a change, and write your Validation Rule to require ISCHANGED(Checkbox__c). Then, if your hidden field isn't shown to the user, it cannot be set in their UI interactions and this will allow your Validation Rule to discriminate between the two cases. This requires changes to all of your automation working on the object and a change to your schema, however.

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.