You need to sign in to do that
Don't have an account?
Stephen Glaros 7
Date Validation Rule between Two Objects?
Hi all - I'm trying to create a validation rule where the date of a child record can't exceed the date of the master record. In other words, if the master record had an end date of 7/30/19, the child record cannot have an end date of 7/31/19.
The error I get is: Error: Incorrect parameter type for operator '>'. Expected Date, received Object
This is what I tried: Implementation_Date_Best_Case__c > $ObjectType.Project_Detail__c.Fields.Project_End_Date__c
Any ideas? I'm thinking it's a validation rule but if it's another function, any advice would be appreciated. thx!
The error I get is: Error: Incorrect parameter type for operator '>'. Expected Date, received Object
This is what I tried: Implementation_Date_Best_Case__c > $ObjectType.Project_Detail__c.Fields.Project_End_Date__c
Any ideas? I'm thinking it's a validation rule but if it's another function, any advice would be appreciated. thx!
You are traversing in wrong way to get the Project_End_Date__c in Validation Rule .
$ObjectType.Project_Detail__c.Fields.Project_End_Date__c ==> Wrong
It should be Like Below:
Project_Detail__r.Project_End_Date__c
below am using the Project Task (Child Object) ==> Project (Parent Object) for your reference.
Thanks.
Maharajan.C
All Answers
You are traversing in wrong way to get the Project_End_Date__c in Validation Rule .
$ObjectType.Project_Detail__c.Fields.Project_End_Date__c ==> Wrong
It should be Like Below:
Project_Detail__r.Project_End_Date__c
below am using the Project Task (Child Object) ==> Project (Parent Object) for your reference.
Thanks.
Maharajan.C