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
Amr MohsenAmr Mohsen 

Create apex trigger to update value in task's related case

Hello , 
I want to create an Apex trigger when I create a task, It updates a field in related case , and also when I close that task , It also modified that field, and since the related object for the task may be either opportunity or case, I don't know how to do that.
I need help please.

Thank you so much.
doravmondoravmon
hmm...maybe your need triggers for both opportunity and case...