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
TheresaAndersonTheresaAnderson 

Update an Opportunity checkbox when a Task is completed

I need help with a trigger to set a  checkbox true on the Opportunity object when a certain task is completed.

 

IF

Task Status = 'Completed'

Task Type = 'Face to Face Meeting'

 

Then set

Sys SA 01 = True

BA_AdminBA_Admin

You can use the workflow to do this

 

If

Task Status = 'Completed'

Task Type = 'Face to Face Meeting'

 

then use the action field update and set Sys SA 01 = True

 

TheresaAndersonTheresaAnderson

I tried the workfow rule where it was based on the opportunity.  The formula would not allow me to link to the Task object.  I tried the reverse too.

BA_AdminBA_Admin

Since Task and Opp are 2 diff objects you need to write a trigger for this, workflow works only if it is one object

TheresaAndersonTheresaAnderson

Do  you know where I can locate sample code for this trigger?