Skip to main content
Kel Hill asked in #Apex
We have a custom field (number type) on Leads, Opportunities and Accounts. We would like the field to update on all three records regardless of which object the user updates it on. Is this possible? (I am not a programmer and have never used triggers before; can I get help with how to use them, if they are the answer?) Thanks.
7 answers
  1. Sep 12, 2017, 8:16 AM
    Hi Kel,

    You can achieve this through trigger but you need to take extreme care while writing this as it will cause a recursion of events.

    For example : Lead field update -> Account & Opportunity fields update.

                           Account field update -> Lead & Opportunity fields update ,

                           Opportunity field update -> Account & Lead fields update.

    This will cause a unended cycle of events so use trigger.old and trigger.new to avoid the recursion.

    Regards,

    Ajay

     
0/9000