Skip to main content

I need to write a validation rule whereby if the Opportunity Stage is "Proposal Submitted" and the OCR Stage is "OCR Not Required" and the last person to update the field OCR Not Required Reason is not a certain user, the form shouldn't be able to be saved.

 

OCR Stage is a picklist and the I have created a text field to store the userID of the person who last modified the OCR Not Required Reason as the field which was originally created to store the user who last modified the OCR Not Required Reason is a lookup which I know you cannot use in a validation rule.

 

Currently I have this:

AND(

ISPICKVAL ( OCR_Stages__c , "OCR Not Required"),

NOT(Not_Required_Last_Updated_Text__c = "UserID"),

ISCHANGED( StageName),

ISPICKVAL( StageName , "Proposal Submitted")

)

 

However, it doesn't matter whether the userID is the correct one or not - the Opp saves and the rule is not triggered.

 

Can anyone help please?

5 Antworten
  1. 14. Mai 2024, 07:50

    I have tried these, however, looking at them, they will not work as there is a flow to auto update the Not Required Last Updated Text field with the ID of the person who last modified the OCR Not Required reason.

     

    I did try logging in as another user to test these however, the form saved no issues.

     

    I need all users to be able to update the OCR Not Required Reason so cannot lock this down. The rule needs to state that if the Not Required Last Updated Text field does not equal a specific UserID, then the opportunity cannot be moved to proposal submitted.

0/9000