function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vijaya Kumar RegantiVijaya Kumar Reganti 

Need help regardind Date Methods

Hi Friends,

 

I have requirement to allow the user to save the contact  record only when the Date__c  field in Account record is in future.

 

How to achieve this.Pls help.

 

Thanks,

 

Vijay 

Best Answer chosen by Admin (Salesforce Developers) 
Eric_HDCEric_HDC

Validation rules just look for a formula to turn true, so you don't need the IF statement. You should be able to just write:

 

Account.TestDate__c < Today()

All Answers

Satish_SFDCSatish_SFDC
Create this validation rule in the Contact object.

IF( Account.TestDate__c <= Today(),true,false)

Replace the TestDate__c with your own date field in accounts.

Regards,
Satish Kumar
Please mark my answer as a solution if it was helpful so it is available to others as a proper solution.
If you felt I went above and beyond, please give me Kudos by clicking on the star icon.
Eric_HDCEric_HDC

Validation rules just look for a formula to turn true, so you don't need the IF statement. You should be able to just write:

 

Account.TestDate__c < Today()

This was selected as the best answer