You need to sign in to do that
Don't have an account?
Chris Grebowiec
Adding a date and time stamp when a task is completed.
Has anyone created code to implement a custom field on tasks that creates a date and time stamp when it is saved as complete?
Is there a specific reason why you are talking code here? This can be achived used workflow rules with a field update.
All i would do is,
-- Create a custom field of date/time data type on acitivity and add it to task layout
-- Create a workflow rule on task, choose whatever option is appropriate for you on when to run the rule and condition is status equals completed
-- Create a field update on task object and choose above created field, then in the specify new field value select formula and select last modified by or whatver field works for you
-- Tie the above field update with workflow rule and activate it.
Let me know if it helps!
Then use the trigger to update the value:
1. First create a custom date time field say Activity_Completed_On__c on Activities.
2. Create a workflow rule on Task object with Rule criteria to "Formula that evaluates to true" and set it as ISCHANGED(Status)
3. In Workflow actions select field update. Select the field created in step1 as "Field to update" and in value use formula as below:
Thanks,
Shailesh.