You need to sign in to do that
Don't have an account?
ArmanM
Restrict Fields from being edited after a certain date
Hi,
I want to restrict a date field and a currency field from being edited. The description for this rule should be that -
How can I get this rule to apply to opportunities?
Thank you,
I want to restrict a date field and a currency field from being edited. The description for this rule should be that -
If(
a) 20th of the current month
b) Close date is within next month.)
//When above condition is true apply the following rule
-> Lock 'Close Date' and 'Amount'
For example if todays date was September 20th and I had a opportunity where its Close date is in October. The close date and amount should be locked. a) 20th of the current month
b) Close date is within next month.)
//When above condition is true apply the following rule
-> Lock 'Close Date' and 'Amount'
How can I get this rule to apply to opportunities?
Thank you,
Anyways the math is not necessarily important (and I did a terrible job explaining it), but just remember that 70% equal 0.70, 100% = 1, etc. and change your validation rule to this:
Probability >= 0.70
&& (MONTH(CloseDate) = MONTH(TODAY()) + 1)
&& (DAY(TODAY()) >= 20)
&& (ISCHANGED(CloseDate)
|| ISCHANGED(Expected_Amount__c))
I tested it in my DE and it fired as expected.
Thanks,
Parker
All Answers
Regards,
Harish.R.
Not sure how that will work. I just want two fields read only and date has to be 20th of each month
Instead of record types and apex, you can try this fairly simple validation rule:
What this does, is if an Opportunity is closing either this month, or next month and the date is equal to or greater than the 20th, it will not allow changes to the Close Date or the Amount field. Is this sort of what you're looking for?
Regards,
Parker
Yes, close but I am looking for if an Opportunity is closing next month and the date is equal to the 20th of the current month, then it will not allow changes to the Close Date or the Amount field.
Thanks
This will restrict the Close Date and the Amount from being changed only if today is the 20th of the current month, and the Close Date is next month.
Regards,
Parker
Just another add on to that validation, I want it only to apply to the opportunities whose probability is greater than 70. I tried the following but that doesn't seem to be doing anything :
Probability >= 70
&& (MONTH(CloseDate) = MONTH(TODAY()) + 1)
&& (DAY(TODAY()) >= 20)
&& (ISCHANGED(CloseDate)
|| ISCHANGED(Expected_Amount__c))
How can I add this on to that validation rule?
Thanks
Anyways the math is not necessarily important (and I did a terrible job explaining it), but just remember that 70% equal 0.70, 100% = 1, etc. and change your validation rule to this:
Probability >= 0.70
&& (MONTH(CloseDate) = MONTH(TODAY()) + 1)
&& (DAY(TODAY()) >= 20)
&& (ISCHANGED(CloseDate)
|| ISCHANGED(Expected_Amount__c))
I tested it in my DE and it fired as expected.
Thanks,
Parker