I would like to set a validation rule for users so that when they select the Stage value on an opportunity to "Validate" or "Contract", they are required to update the custom field "Duration of Contract" (a picklist).
I had created the below validation rule:
AND(TEXT( StageName ) = "Validate",
ISBLANK( TEXT( Duration_of_Contract_months__c )))
However, Duration of Contract is never a blank field, as we have selected 12 as the Default value.
Is there a way to require users to update to the field?
답변 7개
My bad, I missed the "or"
AND(
ISCHANGED(StageName),
CASE( StageName ,
"Validate",1,
"Contract",1,
0) = 1,
NOT(ISCHANGED( Duration_of_Contract_months__c ))
)