You need to sign in to do that
Don't have an account?
Ericv
s-control to update a standard field
Hi
I have a custom field in account called lead source and I would like it to update the leads source in the opportunity when a new opportunity is created. We do not create opportunities when a Lead is converted they are created sometime after so I lose the visiablity to the lead source and our reps select random lead sources in Opportunity when I make it a required field.
I don't know much about java script or s-controls but I have been directed here by SFDC and they said I need to create an s-control to do this. According to them workflow rules will not work.
My though is this could be done by looking at the account ID then pulling the Account lead source and updating the Opportunity Lead source. But I can't find anything on how to do this anywhere. If someone has done this before could you please post your code or point me in the right direction?
Thanks,
E
I have done something similar to what your are speaking about..
You have a couple of options but 1st you should think about mapping the lead source to a contact or account when the lead is converted to a contact. This is built in feature from lead to contact.. As you cannot relate an opportunity to a lead.
Once you have the lead source at the account or contact level you then need to think about taking an action when an opportunity is created. You can either create a custom s-control button which fires an api call to perform this action. I.e. query the parent contact / account and get the lead source - then create an opportunity with this lead source..
or. you can write an apex trigger on opportunity create to query the related account/contact object and populate it this way. Much simplier if you understand apex and triggers. if you have a unique identifier from the contact/account to the lead you can query this lead and avoid the overhead of passing the lead source at conversion..
If your interested i could develop the code required as I already have something very similar..
Good Luck..
Thanks for your help I am going to look into this.
E