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
mahesh p 54mahesh p 54 

Trigger to throw an error for community users when clicked on few stages in opportunity path-how?

User-added image
When the community user logs in he needs to click the stages until Verification but when he clicks on Documents Review stage the trigger should throw an error.The internal user can be able to click on all the stages.
Any help would be greatly appreciated.
Best Answer chosen by mahesh p 54
Gaurav HandooGaurav Handoo

Hi Mahesh

Trying to understand your problem statement, you want trigger to throw an error if community user changes the stage to Document Review?

If this is the case, same can be achieved by simple validation as well, formula should something like this:

AND( $Profile.Id = '<Community user Profile Id>', ISCHANGED(StageName), IsPickval(StageName, 'Documents Review')

Hope this works. Please mark as best answer if it does.

Cheers

Gaurav