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
SamwisematrixSamwisematrix 

Help with code

I am still pretty new to triggers and I need some help.

 

I need a way to update a custom checkbox on the task record when a custom formula number field on the related account record is more than 120.  The use case is that the formula number field "Days_with_no_Activity__c"  is how many days since the last activiity human activity not mass emails, and i want to update the task record prior to inserting it with a check box Unique_Activity__c.

 

Any help would be greatly appriciated.  I have been stuggling with this for awhile.

Satish_SFDCSatish_SFDC
Triggers work when there is any insert, edit or delete event occuring on the task record.
In your case it is a formula field and is calculated automatically and no update event occurs when the formula field is updated.

Why not use another formula field instead of the checkbox field which just displays 'Yes' or 'No' based on the number field.

Hope this helps.


Regards,
Satish Kumar
Please mark my answer as a solution if it was helpful so it is available to others as a proper solution.
If you felt I went above and beyond, please give me Kudos by clicking on the star icon.