You need to sign in to do that
Don't have an account?

Validation Help: Force Comments
I am trying to drive better adoption around having reps enter comments, if they made specific changes to 5 fields on an opportunity. This is only if they made a change to any or all these defined fields.
Defined 5 Fields - changes are made to any or all the fields
(Field_1)
(Field_2)
(Field_3)
(Field_4)
(Field_5)
Comment Fields - This is field that needs to updated
(Oppty_Comments)
Lets say the rep makes a change to field 2 and 3, but failed to enter comments before attempting to save the record. How would I write that in a validation so when the user attempts to save the record, it will throw up an error for guidance.
I almost forgot....this applies to any time these fields were changed. That means, if I edited any of these fields on Monday for the first time and got the error msg and completed the comments field...and then came back on Wednesday and edited any of them...the comments field would not be be blank, but I still need them to get the same error to update that fields again with the most recent information. Hope that mades senses...the net of it is..whether the comments fields is blank or has a value they still should get the error msg if they made a change to defined fields.
Any help would be tremendously appreciated.
Kind regards,
Simply Novice
Try using OR instead of AND:
AND(OR(ISCHANGED(Field_1), ISCHANGED(Field_2), ISCHANGED(Field_3), ISCHANGED(Field_4), ISCHANGED(Field_5)), NOT(ISCHANGED(Comments))
That'll catch a change in any field and require a change in the comments field.
Sorry, my brain must have left early for the weekend! :-)
Amber
All Answers
You're probably going to want to use the ISCHANGED() function.
The formula would look something like this:
AND(ISCHANGED(Field_1), ISCHANGED(Field_2), ISCHANGED(Field_3), ISCHANGED(Field_4), ISCHANGED(Field_5), NOT(ISCHANGED(Comments))
I havne't checked the syntax, but that should work.
Good luck!
Amber
I entered it and recieved a syntax error, so I added an additonal ")" to the end and no errors were found. It is marked active, but when I went into an oppty it still allowed me to make the any or all changes to these fields and allowed me to save it with no error message and no comments. :smileysad:
The other thing that should be part of this....is not when the record is created...only when it's edited.
Thought? I really need to nail this one because we are doing a mass clean up this weekend and this validation will be extremely helpful to the sales leaders.
Amber's validation is correct , but all 5 fields must change for it to kick in. You might want to create a validation rule for each of the five fields if you want this to fire if only 1 field is changed
AND( ISCHANGED( field1 ) , NOT( ISCHANGED( comments ) ) )
Try using OR instead of AND:
AND(OR(ISCHANGED(Field_1), ISCHANGED(Field_2), ISCHANGED(Field_3), ISCHANGED(Field_4), ISCHANGED(Field_5)), NOT(ISCHANGED(Comments))
That'll catch a change in any field and require a change in the comments field.
Sorry, my brain must have left early for the weekend! :-)
Amber
U ROCK!! It worked and worked well!
Many thanks!
Amber,
One small caveat to my validation that came up today.....this should only impact records that have the Division set to SSC. Division is a picklist. I attempted to make a change to the rule you helped me with, but the validation error appears no matter what division is selected. Did I write this correctly? (see below) The formula is not throwing up any errors through the syntax check, but it still is not working correctly.
AND(OR(ISPICKVAL( S_Division__c , "SSC"),ISCHANGED(CloseDate), ISCHANGED(Estimated_Contract_Value__c), ISCHANGED(Term_Number_of_Months1__c), ISCHANGED(Bill_Rate1__c), ISCHANGED(Number_of_Resources1__c )), NOT(ISCHANGED(Opportunity_Change_Comments__c)))
Any help would be tremendously appreciated.
Try this:
AND(OR(ISCHANGED(Field_1), ISCHANGED(Field_2), ISCHANGED(Field_3), ISCHANGED(Field_4), ISCHANGED(Field_5)), NOT(ISCHANGED(Comments)), ISPICKVAL( S_Division__c , "SSC"))
I think that'll work....
Good luck,
Amber
Amber,
It worked like a charm! Many thanks for your prompt response. You make life easy! :smileywink:
Thanks for the kudos!
Amber