You need to sign in to do that
Don't have an account?
Lead Trigger
I have a trigger in production that when a Lead is converted, it will update the Account with the lead information. My problem is that I only want this to happen on New Accounts and not Exsting Accounts. Right now it is overriding the information on an existing account and we don't want it to. How can I change this to only trigger when the account is new?
Here is my trigger:
trigger UpdateAccountFromLead on Lead (after update) { |
Can you get the created date of the account and perform some kind of comparison... not sure if you want to check that the account was created prior to TODAY...just a thought, not sure if it will pan out, but give that a shot.
How do you define a "New Account"? Is that an account created from a converted lead? If so, the Lead object has a field called ConvertedAccountId that you can refer to.