You need to sign in to do that
Don't have an account?

Apex trigger to update a custom field on the account object based on the custom object line items
Hi
I'm trying to write a trigger to update a custom text field on the account object based on the line items (Name field) from a custom object that's linked to the account object. I want the values on the custom text field to be updated as an when line items are added / edited to the custom object or even deleted.
I'm quite new to apex so any guidance will be helpful, thanks
I'm trying to write a trigger to update a custom text field on the account object based on the line items (Name field) from a custom object that's linked to the account object. I want the values on the custom text field to be updated as an when line items are added / edited to the custom object or even deleted.
I'm quite new to apex so any guidance will be helpful, thanks
https://trailhead.salesforce.com/en/modules/apex_triggers/units/apex_triggers_intro
And a rough framework for such trigger: Note, this is just a rough work of the basic trigger and is just a quick sample of how one might do it, normally we'd have handler class for proper trigger logic implementation segregation but that's more complex than is necessary here.