i want a rule where i dont want to associated contact to other objects if contact status is pending.I am not sure how can i achieve this .any suggestion
-
You only want to restrict lookup field on contact or do you also don't want to restrict contact's child record – Tushar Sharma Feb 5 '19 at 5:58
-
means if the contact status is Pending then i dont want to associate this contact to any other entity. – sudhanshu Feb 5 '19 at 6:01
-
Like from account if i add relationship and if contact is Pending then it should throw an error – sudhanshu Feb 5 '19 at 6:02
-
any suggestion/solution to implement this – sudhanshu Feb 5 '19 at 9:04
You can use a Validation Rule like this, e.g. on Case Object:
AND(
NOT(ISBLANK(ContactId)),
ISPICKVAL(Contact.Status__c, 'Pending')
)
If you want to run this rule only on Contact Person (Lookup) change, you can add one additional check:
AND(
NOT(ISBLANK(ContactId)),
ISCHANGED(ContactId),
ISPICKVAL(Contact.Status__c, 'Pending')
)
Please let me know if it helps.
Best, Stefan