You need to sign in to do that
Don't have an account?
lewis
validation rule for dates
i have a parent & child object that has a start and end date . I need a rule that whenever a start/end date is added in the child record, it checks the date is the same or within the date range as shown in the parent record.
What is the relationship between the Parent and Child? If it's Master-Detail you might be able to create Rollup Summary (RS) fields on the Master that return the MAX and MIN Dates from the Child object and a VR that will throw an error if the Child Date is outside the range.
so u r saying i shld create two roll up summary fields in the master object and 2 validation rules ? canu be more clearer on the validation rule ?
Hi,
you can achieve this trough the validation. Here I have taken Start_D__c as contact start date and
Account.Start_Date__c, Account.End_date__c as account start and end date.
Hence validation should be like this:
(Start_D__c < Account.Start_Date__c) || ( Start_D__c >= Account.End_date__c )
Similarly you can write the validation for your end date also.
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
am getting an error in this and would like some help
if the end date is similar to the account end date then it gives and error . i need to show that the dates need to be the same as the account dates or within the date range .
thanks
Try something like: