function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Validation Rule stops Process Builder to fire

Hi All,

I have a Process Builder and a Validation Rule on the Opportunity Object.

The Validation Rule is meant to stop the users from modifying an Opportunity once Closed Won, apart from Admins.
(ISPICKVAL(PRIORVALUE(StageName),"Closed Won"), CASE($Profile.Name, 

And the Process Builder is checking if "[Opportunity].IsClosed = TRUE, and updates the Close Date = TODAY().

Error message:
> The flow tried to update these records: null. This error occurred:

Both the Process Builder and the Validation Rule work fine, but activated separately.

Is there a way to stop the users from modifying the Closed Won Opportunity, but allow the process to change the Close Date for the users?

Anthony McDougaldAnthony McDougald
Hello Ssimion,
Hope that your day is off to an amazing start. We've edited your validation rule to meet your criteria. Please test and report back if you have any problems. Hope this helps and may God bless you abundantly.
(ISPICKVAL(PRIORVALUE(StageName),"Closed Won"),
$Profile.Name <> 'System Administrator'

Best Regards,
Anthony McDougald 
Maharajan CMaharajan C
Try the belows:

TEXT(StageName)== "Closed Won", 
$Profile.Name <> 'System Administrator'

Hello Anthony,

I hope you're well and thanks for coming back to me.

I have amended my VR as per your suggestion, but unfortunately, the process still fails.

Hi Maharajan,

Thanks a lot for your suggestion. I have also tried yours, but unfortunately, I am unable to Closed Won the Opportunity.

Anthony McDougaldAnthony McDougald
Good Evening Ssimion,
Hope that your day is off to an amazing start. Apparently, this is an issue that occurs and will need a work around. For a Process Builder, you would need a custom field to use to bypass the VR. However, we would recommend using APEX as this can automate your solutions while fulfilling the needs of the VR. Hope this helps and may God bless you abundantly.
Best Regards,
Anthony McDougald
Hi Anthony,

Thanks for your reply. I have managed to resolve this now.

Thanks a lot.
Kent FidlerKent Fidler
Hi SSimon,
I'm having a similiar issue. How did you resolve this issue.