You need to sign in to do that
Don't have an account?
Nikita Shatalaev
Validate if Close Date is withing specific range after saving
Hello,
I need to create a validation rule that checks if the CloseDate of edited Opportunity is within specific date range and prevents saving if not.
Here is the example of the rule I have and need to be modified:
AND (
ISCHANGED(CloseDate),
PRIORVALUE(CloseDate)>DATE(2015,9,30),
PRIORVALUE(CloseDate)<DATE(2016,1,1),
$Profile.Name <> "System Administrator")
So this rule prevents editing Close Dates of opportunities within current quarter if you are not system administrator. What do I need to add here to allow saving if CloseDate remains within current quarter, but still restrict it if it moves past December 31st 2015?
I tried adding string CloseDate_c > DATE(2015,12,31) but that didnt seem to work.
Ideas please?
I need to create a validation rule that checks if the CloseDate of edited Opportunity is within specific date range and prevents saving if not.
Here is the example of the rule I have and need to be modified:
AND (
ISCHANGED(CloseDate),
PRIORVALUE(CloseDate)>DATE(2015,9,30),
PRIORVALUE(CloseDate)<DATE(2016,1,1),
$Profile.Name <> "System Administrator")
So this rule prevents editing Close Dates of opportunities within current quarter if you are not system administrator. What do I need to add here to allow saving if CloseDate remains within current quarter, but still restrict it if it moves past December 31st 2015?
I tried adding string CloseDate_c > DATE(2015,12,31) but that didnt seem to work.
Ideas please?
That will throw an error if the date is change, if it's old value was inside the quarter and the new value is not in the quarter and the profile is not an admin.
1) the close date is changing
2) determine if the prior value of the close date is in the current FQ (more info here: https://developer.salesforce.com/docs/atlas.en-us.usefulFormulaFields.meta/usefulFormulaFields/formula_examples_dates.htm)
3) determine if the new close date is later than the current FQ
4) check to see if this is not a system admin