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

Avoid adding same contact to another lookup field
Hello All,
We have four contact lookup in the custom object called 'Reservation Center'. Values entered in the lookup fields should be unique.
If we provided value for Contact1__c as Test Contact, then rest of other three lookup field should not use Test Contact.
Is this possible in the configuration? If not, please provide suggestion on how to achieve this in code.
We have four contact lookup in the custom object called 'Reservation Center'. Values entered in the lookup fields should be unique.
If we provided value for Contact1__c as Test Contact, then rest of other three lookup field should not use Test Contact.
Is this possible in the configuration? If not, please provide suggestion on how to achieve this in code.
Try this, it worked for me:
(Replaced ISNULL with ISBLANK)
Regards,
Prakhar
All Answers
This can be achieved by using a Validation Rule.
If the four lookup fields to Contact in 'Reservation Center' object are Field_1__c, Field_2__c, Field_3__c and Field_4__c, then the following Validation Rule on 'Reservation Center' object can be applied:
Regards,
Prakhar
Thanks for the suggestion. I have tried the above scenario. Still, I got no luck.
Below are the formula is used to achieve:
Sorry, my previous formula didn't work properly. If I keep blank in all field is showing the error message. But it shouldn't behave like that. Do you have any idea about that
Try this, it worked for me:
(Replaced ISNULL with ISBLANK)
Regards,
Prakhar
Thanks. It's working fine.