You need to sign in to do that
Don't have an account?
JP12345
How to get changed record owner of lead conversion page?
Requiement:
On lead convert, I want Record owner specified on lead conversion page to be set as Account Executive (This is custom field on Account object).
I have update trigger on lead object which will set Account Owner as Account executive on lead conversion.
On lead conversion, Salesforce assigns system user to Account Owner for a while.After trigger execution ends,it assigns lead owner as an account owner.
Question:
How to get changed record owner of lead conversion page in leadtrigger?
Any help is appreciated.
In the after update trigger on Lead:
1. test to see if the Lead isConverted, if true, then do steps 2-6
2. Fetch the Opportunity from the <lead>,ConvertedOpportunityId field
3. Using the results of #2, you'll have the record owner
4. Fetch the Account using the value in <lead>.ConvertedAccountId field
5. Update the custom field in Account
6. update <theAccount>
Be sure to bulkify your after update trigger as it is possible to do batch lead conversions