You need to sign in to do that
Don't have an account?
Rohit Vaidya 3
trigger on account to update contact field
- Write a trigger on Account to perform the logic described below whenever “Budget” changes. Note that the “Budget” field may sometimes be empty.
- The Account “Budget” is to be divided in 2 portions (60% for Sales and 40% for Marketing). The Sales portion is to be equally distributed by all Contacts of that Account that have “Use Sales Budget” checked. The Marketing portion is to be equally distributed by all Contacts of that Account that have “Use Marketing Budget” checked.
You can use below code to get started
This trigger on Account that divides the budget into two portions (60% for Sales and 40% for Marketing), and then equally distributes each portion among the Contacts of that Account that have the appropriate checkbox checked.
I have created custom fields Budget__c(number), Use_Marketing_Budget__c(checkbox),Use_Sales_Budget__c(checkbox) on contact object that are used in this code
If this information helps, please mark the answer as best. Thank you