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

validation rule not working on new date field created.please help me
Hi,
I create new date field on opportunity object and i want this field to be first filled by user while creating new opportunity record and then after that this field should be locked and i create the vaidation rule for this on new created fields and rule like this:
validation rule on opportunity object and here is the syntax :
AND(
ISCHANGED( Original_Close_Date__c ),
NOT( ISBLANK( PRIORVALUE( Original_Close_Date__c ) ) )
)
But when i test as user then i am still able to change the new field on already creted record..
any idea please help me
thanks
I never saw a reply to my last follow up on this same question over in Answers, but can you confirm that the Original Close Date field had a date in it before you edited the field?
Also, is your main goal just to capture the original date entered into the Close Date field when the Opportunity is first created? Do you have Enterprise or Unlimited Edition? If so, it would be easier to just create a workflow rule to enter the first Close Date value into the field upon creation of the Opportunity, and make the Original Date Field read only. This removes any need for a user to manually do anything with the Original Close Date field.
Just in case someone finds this question and doesn't see the solution on Answers, here is the solution:
Ok,now we are getting somewhere. Lets get this over with by writing a workflow rule.
1. Make the Original Close Date field Read Only (at the field level, so it is always Read Only).
Note: You, as a system administrator WILL be able to edit it because you can edit all Read Only fields except for Formula fields.
2. Create a new workflow rule by clicking Your Name > Setup > Create > Workflows & Approvals > Workflow Rules
Object: Opportunity
Name the Rule
Evaluation Criteria: "created"
Run Criteria: Opportunity:Created Date not equal to __________ (leave Value field blank)
Click Save & Next
3. Add Workflow Action - New Field Update.
Name the Field Update
Select Field to Update: Original Close Date
Select "Use a formula to set the new value"
Enter into the formula bar: CloseDate
Click Save.
Click Done.
Make sure to click the Activate button on the workflow rule.