You need to sign in to do that
Don't have an account?
Kel Hill
Update the corresponding custom field on two other objects if it is updated on any of the three objects it exists on
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.
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
All Answers
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
I think it depends upon how you are matching records. If its a complex logic then you will have to write trigger for this.
Regards,
Ajay
SCENARIO ONE
User updates AuthForms number field on an Account
IF that Account contains any Leads or Opportunities, populate the AuthForms number field on those Leads and Opportunities with the same number that has been entered by the user on the Account
SCENARIO TWO
User updates AuthForms number field on a Lead
IF that Lead is attached to an Account, populate the AuthForms number field on that Account with the same number that has been entered by the user on the Lead, and if that Account has any Opportunities attached to it, populate the AuthForms number field on those Opportunities with the same number that has been entered by the user on the Lead.
SCENARIO THREE
User updates AuthForms number field on Opportunity
IF that Opportunity is attached to an Account, populate the AuthForms number field on that Account with the same number that has been entered by the user on the Opportunity, and if the Account has any Leads attached to it, populate the AuthForms number field on those Leads with the same number that has been entered by the user on the Opportunity.