Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am having one custom object name as club with custom lookup field with contact object.

Let us assume we have 3 records in my club object(club1,club2 and club3).

When I assigned one member to club1 record , I shouldn't assign the same member to another record either in club2 or club3.

If I try to assign the same member to other club records I should be stopped with an error message.

How this can be achieved.

Thanks in advance

share|improve this question
up vote 4 down vote accepted

As a Lookup can not be unique, you will have to create a new text field(e.g:ContactId__c) and make it Unique, that's very important. Then by workflow, you can populate this text field from your custom lookup.

So now that means when you create a new member for the same contact, you will get the following error : "Duplicate value on record: 'Record_Name' (Related field: ContactId)"

share|improve this answer
Thanks its working fine. Can I customize this error message "Duplicate value on record: 'Record_Name' (Related field: ContactId)". – Mangoski Apr 22 '14 at 9:59
Unfortunately not with this solution. If you want a custom error message, you will need to go for a solution with a trigger which is more expensive as you will need some code and a developer. – brovasi Apr 22 '14 at 10:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.