You need to sign in to do that
Don't have an account?

Having problem in approval process.
Hi all,
I had created an approval process, to automate the submission I wrote a trigger.
I used the below Condition to Exclude profiles from entering the approval process.
if(trigger.new[i].stageName != 'Closed Won' && oldOpp.stageName == 'Closed Won' && (UserInfo.getProfileId() !='00e200000019jtu' && UserInfo.getProfileId() !='00e20000000seRt' ))
The records are getting locked for all the Profiles, even for the excluded profiles.This should not be the Case.
In the approval process I used the criteria as:
Opportunity: Stage not equal to Closed Won
Any help to over this issue come will be appreciated.
Thanks in Advance.