You need to sign in to do that
Don't have an account?
Validation rule using $ObjectType and Picklist field ....
Hi,
I am using a validation rule to check that a picklist selection does not match an sObject field (which also is a picklist field).
Here is the formula I am using:
(ISPICKVAL(Language__c,'English') && $ObjectType.SetUp__c.Fields.Msgs_Lang__c = 'English')
The error message is not triggered so I checked and the problem is with the object $ObjectType.SetUp__c.Fields.Msgs_Lang__c which is not returning its true value (the problem might be it is a picklist field).
I tried with VLOOKUP instead, however it does not support picklist fields.
Any suggestions as to how could I compare a picklist selection to an other custom field on other sObject?
Thanks a lot!
Hi,
I testted with the similar validation which seems to be working fine if the format is as follows..
ISPICKVAL(Language__c,'English') && ISPICKVAL( $ObjectType.SetUp__c.Fields.Msgs_Lang__c = 'English')
However, you have to make sure there is a relation between the two objects and that you create a validation for each value of the picklist.
relationship.. I tried anyways but didn t work.
Regards,
I tried the validation you mentioned but getting an Error -
Error: Incorrect parameter type for function 'ISPICKVAL()'. Expected Picklist, received Object
in my case I ensured that Cross Object Field is Picklist though i am getting an error while attempting a validation rule.
You got any Solution..?
Thanks