Skip to main content
I have a customer object that displays the lead email address.  If I need to update the email I need to open the associated lead and update it there, then refresh my record.

 

I would like to put a field on the custom object where we can enter a new email address for the lead, and a button that, when pressed, will take the email from that new custom field, update the lead email and refresh the custom object record.

 

Any help on this?  I have tried a few javascript solutions but they are failing.
10 respuestas
  1. 28 sept 2016, 15:29
    Ok that makes it easy. Now I wouldn't go for a Javascript button because of two reasons:

     

    1. Those aren't supported in Lightning (which is the future Salesforce).

     

    2. Maintaining them might require developer assistance.

     

    There are two declarative (point & click) ways to go about this:

     

    1. If you want the update on Lead to happen everytime the related custom object record's Email is updated, I wouldn't bother creating a custom button. You can create a simple Process using Process Builder which would fire when then Email field on custom object record is changed and would then update the related lead's email too. Simple and straightforward.

     

    2. If you want the update on Lead to be optional and are indeed looking for a custom button, Flows is the way to go. Check out the following link which explains a similar implementation step by step:

     

    https://developer.salesforce.com/docs/atlas.en-us.workbook.meta/workbook/flow_0_intro.htm

     

    Go through Step 1 to Step 6 and you should be all set to design your own custom button on the custom object.  

     

    Good luck!