function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Nathan_AgerseaNathan_Agersea 

Lookup Relationships between Standard Objects.

I've read that Lookup Relationships between standard objects are not supported with the native app.  Does anyone know of a way around this limitation? 

 

Take, for example, the relationship between a lead and his or her real estate agent.  The outside real estate agent is a contact and the prospective buyer is a lead.  I want to show this relationship as a lookup between lead and contact, but this is not currently possible with the native IDE.  Does anyone know of a way around this?

 

Nathan 
Ian_HIan_H

Hi Nathan,

You're right, you can't create direct links between 2 standard tables. There is a work-around..

You need to create a join table that links to both the standard tables.
So in your example, you create a new table with a lookup field to lead, and a lookup field to contact for the agent.

Give the table a name like Agents Leads, and have the records auto-numbered.
Using auto-numbering makes it easier when creating the records, but means you won't be able to simply search for all of an agents leads by name. The alternative is to have a text field for the record names, in which you could write the agents name and the leads name. This will make searching easier, but will introduce more errors if people start spelling things wrong.

Adding two lookup fields will automatically add the related lists on the contact record and the lead record.

So looking at an agents contact record, you will see a new list of all the leads they are working on.

Looking at a lead record you will see a list showing the name of the agent looking after them.

Hope this helps.

Ian.

Nathan_AgerseaNathan_Agersea

Thank you for the suggestion.  That was my first approach, but the client was not satisfied with this solution.  They felt that the data entry flow was too combersome.  The two bigest complaints were:

1) an inability to add a new contact or lead from the corresponding related list.

2) Being directed to the middle man object screen as opposed to the newly created lead or contact.

Does anyone know if Salesforce plans to open up lookup realationships between standard objects any time soon?

 

Thanks again for your post Ian!

ahsensaeedahsensaeed

instead of using standard contact object why don;t you create a new custom object and link it with the lead.  you can write me for more help if required 

( ahsen.saeed@curemd.com)

 

gireeshzgireeshz
hello all,

i am a new salesforce developer looking for an answer to this same question of creating a custom field lookup relationship between standard obects.  specifically, i would like to create a lookup relationship field to another contact from a contact.

i see that salesforce is doing this with a standard field for the 'reports to' field.   is there any way to create this type of relationship directly, witout using a 'join table' as specified above?

does anyone know if this is addressed in the winter  '07 release?

Thanks much to all!