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

Custom Object with Lookup Relationship to Lead or Contact

I have created a custom object for Sales Aid & Sample Requests.  The purpose of this object is to enable the user to put in a request from either the Lead or the Contact for various sales aids or samples.  Once the request is completed, it will be emailed to the appropriate fulfillment person and copied to additional internal people.

Since a Sales Aid or Sample can be requested for either a Lead or a Contact, I would like to use the same object on both of these objects (Lead/Contact).  I have a Lookup field for Contact as well as a Lookup field for Lead.  My problems start when I want to use a formula field to bring in the Lead Address or Contact Address, depending upon whether the request is generated from a Lead or a Contact.  There are a few other fields that I would also like to use a formula to populate, but of course, these field names differ between the two.  Of course, I can create a "Lead Address field" and a "Contact Address field", etc., but this looks messy so I was looking for a way to (1) identify whether the request is being generated from a Lead or Contact (2) Pass by formula the correct values and (3) still be able to pull all of the fields into an email template, so even our personnel without licenses can see that the sample/sales aid was requested.  I will also need to be able to pull together a single report of all of the sales aids/samples fulfilled. 

Does anyone have any suggestions or knowledge of how to identify what object the request was generated from, and then have the remaining formula fields reference and return the correct values?

Thanks for any insight as I've been mulling on this one for some time.
Steve :-/Steve :-/
What if you created 2 Record Types, and Page Layouts for your (custom)Sample Request.Object.  One for Lead Requests, the other for Contact Requests.  Then based on the Record Type you could evaluate the (source)address from the related record, and pass them into your (target)address. 

Another (quick&dirty) option might be to use Tasks for this, since they can already be related to either a Contact, or Lead.  Create a custom Record Type, and Page Layout for your Sample Request(Task) and hack out whatever standard Task field you don't need, and add whatever custom fields you need.  

Message Edited by Stevemo on 01-13-2009 05:31 PM

Hi there,


Can anybody teel me that is it possible in salesforce to have a look up relationship with a custom field of a custom object?