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
RejonesRejones 

Apex Code to do a Field Update

I built a lookup Relationship field on the opportunity page that looks up to the User Object in order to create a workflow rule and email alert that will alert both the Opportunity Owner and that individuals manager.

 

I need to have that field populated based on the role hierarchy at my company.  Can anyone help me with building the code for the trigger the field needs to be populated every time an opportunity is created.