You need to sign in to do that
Don't have an account?
selva kumar 14
Apex Trigger for duplicate data from text field to another lookup field in the same lead object
Hi Everyone,
I don't have much knowledge about apex coding. I have tried few triggers using some developers sample available in discussion forums. But i can't able to acheive my goal. My requirement is given below.
There are a few fields that cannot be updated through the standard SalesForce interface, and can only be updated via Apex code. We need to duplicate some information from a text field on the Lead and Opportunity screens, and populate it into a lookup field in the same object. Required details are given below.
Object - Lead/Opportunity
Originating field (from) - Referral Text (text)
Destination field (to) - Referral Partner (lookup)
When to trigger - Upon update/Insert of Referral Text value
It would be much apprciate,share few sample codings. Please help on this.
Thanks in advance.
I don't have much knowledge about apex coding. I have tried few triggers using some developers sample available in discussion forums. But i can't able to acheive my goal. My requirement is given below.
There are a few fields that cannot be updated through the standard SalesForce interface, and can only be updated via Apex code. We need to duplicate some information from a text field on the Lead and Opportunity screens, and populate it into a lookup field in the same object. Required details are given below.
Object - Lead/Opportunity
Originating field (from) - Referral Text (text)
Destination field (to) - Referral Partner (lookup)
When to trigger - Upon update/Insert of Referral Text value
It would be much apprciate,share few sample codings. Please help on this.
Thanks in advance.
Your trigger needs to be something close to the following. Caveat emptor - I haven't compiled this. I've also assumed the field and object API names, so those may need to change:
All Answers
Actually,referral text have data that comes from web form as a lead. Through that need to populate that text data to lookup field(Referral_Partner).
Am i answering your question?
Your trigger needs to be something close to the following. Caveat emptor - I haven't compiled this. I've also assumed the field and object API names, so those may need to change: