You need to sign in to do that
Don't have an account?
Shivani Desai
Validation rule on Opportunities Failing
Hi,
I have a validation rule where in am trying to control the opportunity from moving to a 100%(closed won) if the stage is not changed by the legal department. The legal department has to verify some of the documents before the contract is signed. Somehow the sales team is able to change the probability irrespective of the validation.
My validation rule
AND( OR(ISCHANGED( StageName )) , OR( ISPICKVAL( StageName ,"PO/Signed Contract"), ISPICKVAL( StageName,"POC Signed Contract") ), $User.Id<>"005G0000002kon2",$User.Id<>"005G0000002iftc")
Checks if the stagename is changed to either of these picklist values and whether the user id does not belong to one of these two users.
Can anyone please help me? Am doing something wrong but unable to detect what?
I have a validation rule where in am trying to control the opportunity from moving to a 100%(closed won) if the stage is not changed by the legal department. The legal department has to verify some of the documents before the contract is signed. Somehow the sales team is able to change the probability irrespective of the validation.
My validation rule
AND( OR(ISCHANGED( StageName )) , OR( ISPICKVAL( StageName ,"PO/Signed Contract"), ISPICKVAL( StageName,"POC Signed Contract") ), $User.Id<>"005G0000002kon2",$User.Id<>"005G0000002iftc")
Checks if the stagename is changed to either of these picklist values and whether the user id does not belong to one of these two users.
Can anyone please help me? Am doing something wrong but unable to detect what?
AND( ISCHANGED( StageName ) , OR( ISPICKVAL( StageName ,"PO/Signed Contract"), ISPICKVAL( StageName,"POC Signed Contract") ), $User.Id<>"005G0000002kon2",$User.Id<>"005G0000002iftc")
Have checked that the user id's are correct. Am suprised by this as even if the user id's were incorrect, it should not allow others to change the stagename.
In the description, you said that users are able to change the probability, is it probability or stagename that the users are able to modify. If it is probability, then yes, as the validation rule is written to check the stagename change, it will not throw any error when only the probability value is changed.
Thanks,
Shivani
AND(ISCHANGED(StageName), ISPICKVAL(StageName,"Closed Won"), $User.Id <> "005900000019OsY")
To troubelshoot your issue, I would suggest setting up a debug log and replicate the issue by logging in as one of the sales users who are currently able to make the changes. You can then review the debug logs and see what is the status of the validation rule (pass or fail)