0

Created Validation rule (below) to ensure product(s) has been added before a certain stage, but can't add products to an already created opportunity that is beyond that stage. When I go to add a product the validation rule triggers and brings me back to the opportunity, essentially locking that opportunity. How do I fix it where they can't progress the opportunity to a stage but they can add a product?

AND( 
ISPICKVAL(StageName, "Customer Webinar Completed, Cultivate") || 
ISPICKVAL(StageName, "Customer Webinar Completed, Interest") || 
ISPICKVAL(StageName, "Proposal Accepted") || 
ISPICKVAL(StageName, "Proposal/Price Quote") || 
ISPICKVAL(StageName, "Closed Won") || 
ISPICKVAL(StageName, "Proposal/Project Quoted"), 
HasOpportunityLineItem = FALSE, 
DATEVALUE( CreatedDate )<>TODAY(), 
RecordType.Id = '01234000000XXXX' || 
RecordType.Id = '01234000000XXXX' || 
RecordType.Id = '01234000000XXXX' || 
RecordType.Id = '01234000000XXXX' || 
RecordType.Id = '01234000000XXXX' 
)
1

I believe based on your description that what you need is to add an

ISCHANGED(StageName) 

check within your outermost AND().

This will result in your validation rule only being evaluated when the Stage of the Opportunity is updated; other changes to the record won't trigger it at all.

|improve this answer|||||
  • Thanks David, this works great, I'll try and come up with something more difficult next time. – G_Shish Apr 23 '19 at 21:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.