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
Scott.MScott.M 

Lead Relationship Object Conversion

If I have a custom object related to leads, is it possible to map the objects to another object during the conversion. For example if I make a custom family_member object to attach family members to a lead. Can I then define a rule that will convert each family member to a contact and generate the relationship between the contacts. Do I need to do this in apex and is there an event that gets triggered on conversion?

Thanks for any help,
Scott
Scott.MScott.M
The answer is no. There's no on convert trigger and create triggers don't get fired on convert even if new opportunity, contact and accounts get created. Only custom lead fields can be mapped to custom fields of the opportunity, contact, and account. Any other conversion logic is not possible.
tbardhantbardhan
Scott -

I ran into a similar problem, specifically regarding Apex insert triggers not firing for Accounts and Contacts on lead conversion.  However, I found that AFTER insert triggers DO fire - it's only BEFORE insert triggers that do not fire.  And of course, all fire normally if the Account or Contact is created by regular means.

I had posted the reproduction case on the Apex discussion board (showing that AFTER insert triggers do fire but BEFORE insert triggers do not).  Check the third post in the thread for the full example and test results.

http://community.salesforce.com/sforce/board/message?board.id=apex&thread.id=2026

I currently have an open case with SFDC on this.  I have not yet checked whether the same holds true for Opportunities.

Of course, the after insert Apex trigger can be a bit more annoying to use since Trigger.new is read-only and you have to use SOQL to grab an updateable handle for the object that was inserted.

T





Message Edited by tbardhan on 01-02-2008 12:00 PM
Scott.MScott.M
Thanks for the response! :) very helpful! I guess I should have searched the forums more carefully

Scott