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
lewislewis 

restrict approvals to a number and by role

I have an object "waivors" that has an approval process . what i am looking to do is to allow an approver based on his role to approve only 5 records in a month. If he tries to approve a 6th time, he gets an error msg saying he has crossed his limit.

to start this, i need to link the object to the user. i need to create a field "no of approvals" on the user. Roll up summary with coun as the option. The user custom fields dont allow this option .. is there any way i can accomplish this ?

I need to also then create a validation rule that says if user count =5 and user role = country mnagr, then dont allow any more approvals.

appreciate the help.