+ Start a Discussion
Paul Harrington 9Paul Harrington 9 

Give your question a title...


We currently have created a custom object (Account Enrollment Data Sheet) within Salesforce that upon creation of the EDS record  pulls data from the Account and Opportunity objects primarily to populate the same fields represented within the custom object  - aka Account Enrollment Data Sheet .  The EDS is accessed via the Mini-Page layout off the Opportunity which is associated to the Account.  

Within the Account we have contacts that are associated to the acount.  One of our challenges has been to populate the Benefit Contact and Billing Contact fields contained within the custom EDS object with the contacts associated to the Account in which we are working.  We are working with a contracted concern to assist us with this delivery and so far this particular issue has stumped them.  They have tried a filtered lookup field but that doesnt work as its only showing the most recent contacts that have been "touched" buy that user.  Ideally, when the EDS record is created, we wanted to automatically populate the Benefit and Billing Contact fields on the custom EDS object.  The contacted concern could not delvier this requirement.
They have used formula's, filters, etc. to attempt to deliver this requriement.  At this point we are at a loss to understand why if I am already on the Account/Opportunity, I cannot either -automatically populate these two fileds or use the lookup to list just those contacts associated to the account in question.

Any feedback or recommendations would be greatly appreciated.


As you have already tried lookup filters which did not work, creating custom lookup if you are using visualforce is the only way . The below articles have example codes on how to create a custom lookup field that when clicked will query and populate the related object records 



hope this helps !

David "w00t!" LiuDavid "w00t!" Liu
Honestly it sounds like it should be possible to populate the Benefit Contact and Billing Contact fields on the EDS.

The ONLY problem is that there are multiple contacts from an Account to choose from and you need just one for each of the fields. If you can logically provide a way to choose a single contact out of many, it should definitely be possible (ie Contact must have Contact Role X on the Account).

If there are multiple Benefit Contacts and Billing Contacts per EDS record and you want to associate all of the Account's contacts, this is even easier! You just need a junction object to allow for the many-to-many relationship between the EDS and the Contacts.