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

how to use a field in validation from other object that does not have relation
Hi All,
How to use a field in validation from other object that does not have relation in between.
The StageName and Renewal are from 'Opportunity' and Details_Required_for_Renewals__c is from the object 'Product'.
There is no relationship in between the Opportunity and Product objects(means no lookup or masterdetail field is created)
I wrote the formula as given:
AND(
Renewal__c="",
OR( ISPICKVAL( StageName, "Signed contract received"),
ISPICKVAL( StageName, "Closed Won")),
$ObjectType.Product__c.Fields.Details_Required_for_Renewals__c, "FALSE"
)
when i'm clicking check for syntax i'm getting the following error
" Incorrect parameter for function AND(). Expected Boolean, received Object "
any help to overcome this error will be appreciated.
Thanks in Advance.
No, you can use only related object’s field and fields of current object in validation. And to use other object’s field without relationship doesn’t make sense.
To use another object with out relationship you would have to use Apex.
You can achieve this using a trigger.
Give me the exact scenario and all the If's and but's I will help you with the trigger.