You need to sign in to do that
Don't have an account?
Ana Rottaro
validation rule on create only causing problems on edit
I have the following validation rule and I want it to only prevent creation of new opportunities if one already exists and is open (what Count of Opportunities is counting). However, I had an account executive unable to Close Won an existing Opportunity which is the only opp on the account because of it.
AND(
Account.Count_of_Opportunities__c>0,
$User.Title == "Account Executive",
isnew()
)
AND(
Account.Count_of_Opportunities__c>0,
$User.Title == "Account Executive",
isnew()
)
The formula looks good and it should work as expected only preventing to create new opps if there is atleast one opportunity existing on the account. (I tested in my org with same and its wokring fine).
Please verify if there are any other similar validation rules on opportunities preventing user to edit. Also cross verify if the error message on the record is matching with your current validation rule error message.
Hope this helps!
Thanks
All Answers
The formula looks good and it should work as expected only preventing to create new opps if there is atleast one opportunity existing on the account. (I tested in my org with same and its wokring fine).
Please verify if there are any other similar validation rules on opportunities preventing user to edit. Also cross verify if the error message on the record is matching with your current validation rule error message.
Hope this helps!
Thanks
Thanks for your response! I just realized it is because we have a trigger that creates a renewal opportunity when the new business opportunity is closed won. What was happening was the person editing the opportunity was trying to edit the existing opportunity to close won and it would fail because a new opportunity was being created. I guess the order of events made it out to be that the roll up of opportunities would briefly move to 2. I resolved this by adding a part to the validation rule where it only runs for new business opportunities.
Thanks for letting me know it would have run otherwise!