Search code examples
salesforceapex-code

How to create a lookup relationship with Contact (Email) in salesforce?


How do I create a lookup relationship with a Contact in salesforce? I am trying to create related list between custom object and a contact. Custom object data is based on the contacts email address (but not on contact ID).

Any kind of help is appreciated! Thanks.


Solution

  • You can add a custom field to your custom Object that is of type Lookup(Contact). See Setup->Create->Objects->. Then scroll to the Custom Fields section.