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
Vishwas SVishwas S 

Trigger for task dependencies in salesforce

I am writing a trigger that has to fire when a predecessor task Status field (Picklist field) is marked "completed" then the successor task Status field (Picklist field) should populate "Started"  I have tried to build something but still have very limited knowledge.
Deepali KulshresthaDeepali Kulshrestha
Hi Vishwas

Your trigger will be called 'after insert' and 'after update'.
Because after insertion time you choose status 'Completed' then your successor status change and populate 'started'.
you choose after the update you can change your status and choose 'completed' then successor status also change.


I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Deepali Kulshrestha
www.kdeepali.com