I have created a Validation Rule on the opportunity that says if the Close Date is pushed then a reason needs to be added to the field Reason_for_Push_Out__c as shown below.
AND(
IsChanged
(Period_End_Date__c)&&
(CloseDate > PRIORVALUE(CloseDate)),
OR(
ISBLANK(Reason_for_Push_Out__c)))
This works fine the first time the close Date is pushed but if the close Date is subsequently pushed out a second time the validation Rule doesn't fire as the Reason from the first push is already there. How would I best get around this please?
Thanks
Stephen
11 件の回答
Hi, does anyone have an idea how to modify my Validation Rule here. The issue is that I need the sales team to capture a reason for Close Date changes. During the life cycle of an opportunity the date can potentially be pushed several times, either for the same reason or different ones. I need to capture the latest reason.
I have used
AND(
ISCHANGED(Period_End_Date__c),
DATEVALUE(RIGHT(Text(Period_End_Date__c) , 10)) > DATEVALUE(RIGHT(Text(PRIORVALUE(Period_End_Date__c)) , 10)),
OR(
ISBLANK(Reason_for_Push_Out__c),
Push_Reason_Last_Updated__c < NOW()
)
)
This works if Reason For Push Out field is blank (i.e. the first time close Date has been pushed) however it will not allow me to save if I move the Close Date a second time. I have tried to timestamp the Reason for Push Out and then compare to current time as shown above but this doesn't work.
Does anyone have any ideas as this is starting to grind my gears!!
Thanks
Stephen