function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Adam LeeAdam Lee 

Update Account with the MAX value from the child

Hi all.

I'm new with Apex. I want a trigger that will update a text field on the Account with the MAX value from a child object field. I know I can use the Roll up summary but users cannot search the value for this field. Can anyone help?

Thank You

Adam
Best Answer chosen by Adam Lee
Ramu_SFDCRamu_SFDC
Follow the guidelines as explained in the below article and use SOQL max query to get maximum value from child record.

http://salesforce.stackexchange.com/questions/23338/trigger-to-update-parent-object-value-with-child-value