• tbardhan
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
I have some Apex code that kicks off from the before Insert trigger for Account, conditionally updating some custom fields etc.  It appears to be working as intended when a new Account is created using the "New" button on the Account tab.

However, the same Apex does not appear to execute when Lead Conversion causes a new Account to be created.  The new Account from the converted Lead shows up fine except the fields that were supposed to be set by my Apex code were not set.

Being a newbie, before I dive into my code to try to figure out if something's wrong with it, I wanted to know if this is a known gotcha.  I.e., should the before insert trigger for Account be kicked off for a new Account from lead conversion in the same way as if the same Account data were entered manually via the "New" button?

(If not, any suggestions for a simple, maintainable workaround?)

I put a debug statement into the Apex method called by the before insert trigger, and unless I am not reading it correctly, it appears to be logged when the "New" button is used to create the Account but not when lead conversion is used to implicitly create the Account.

In this case, the development and testing is occurring on a Sandbox instance (logging in from tapp0.salesforce.com).

Thanks in advance.

T
I have some Apex code that kicks off from the before Insert trigger for Account, conditionally updating some custom fields etc.  It appears to be working as intended when a new Account is created using the "New" button on the Account tab.

However, the same Apex does not appear to execute when Lead Conversion causes a new Account to be created.  The new Account from the converted Lead shows up fine except the fields that were supposed to be set by my Apex code were not set.

Being a newbie, before I dive into my code to try to figure out if something's wrong with it, I wanted to know if this is a known gotcha.  I.e., should the before insert trigger for Account be kicked off for a new Account from lead conversion in the same way as if the same Account data were entered manually via the "New" button?

(If not, any suggestions for a simple, maintainable workaround?)

I put a debug statement into the Apex method called by the before insert trigger, and unless I am not reading it correctly, it appears to be logged when the "New" button is used to create the Account but not when lead conversion is used to implicitly create the Account.

In this case, the development and testing is occurring on a Sandbox instance (logging in from tapp0.salesforce.com).

Thanks in advance.

T
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