I have a validation rule which do not allow all Users to update the Territory field on Opportunity manually after creation.
NOT(ISNEW())
&& NOT(ISNULL(PRIORVALUE(Territory2Id)))
&& ISCHANGED(Territory2Id)
&& ($Profile.Name <> "Sales Representative")
&& ($Profile.Name <> "System Administrator")
The problem is when any User from other profile creates an Opportunity then Territory2 field is BLANK on it.
How I can modify the Formula to calculate this validation rule only on existing Opportunity not on NEW.
Any help would be much appreaciated.
Thanks!
9 件の回答
Hi Eric,
Okay let me explain the use case -
Whenever any new Opportunity is created , it gets the Territory2 information from the Account. Now, our requirement was to restrict any User to update Territory2 field on Opportunity after creation.
Also, Territory2 field can't be made restricted from the field level security and this can be achieved only via Page Layout or Validation rule. Since, we just needed to give the edit access to 2 Users hence creating new Page Layout for them was not a better solution, so created Validtion Rule.
Now, the problem is whenever any Other User creates an Opportunity then Territory2 field is being BLANK on those records.
And if I deactivate the Validation Rule then Territory2 field is auto-populating from Account when any other Users are creating new Opportunity.
So basically, validation is not firing on the screen but in the back-end it is stopping the update of Territory2 on Opportunity while creation.
So not sure, how I can handle this because I just need this validation behavior on existing records not upon new creation.
Thanks!