You need to sign in to do that
Don't have an account?
Alex Critch
How to update last modified date/time when only an activity is added to a case
I have seen some posts with similar issues, but nothing exact to my organization; but apologies in advance if this is a duplicate.
I am trying to figure out how to update the Last Modified Date/Time field when an Activity is added to a case. We do not use email to case, we have our own process in which the support engineer uses the "Log a call" button in the Activity section when information is either sent to the customer or received from the customer.
If that is the only field edited then Last Modified Date/Time is NOT updated. I understand that this is the functionality, but I need to have this field update in order to report on the "Time Since Last Touch" which is a formula I created that compares the Last Modify field with NOW().
I have been told I need an Apex trigger to do this, but as a newbiew to Apex and Salesforce administration tasks I need help. Is this something simple to implement or shoud I just give up?
Any help would be greatly appreciated!
I am trying to figure out how to update the Last Modified Date/Time field when an Activity is added to a case. We do not use email to case, we have our own process in which the support engineer uses the "Log a call" button in the Activity section when information is either sent to the customer or received from the customer.
If that is the only field edited then Last Modified Date/Time is NOT updated. I understand that this is the functionality, but I need to have this field update in order to report on the "Time Since Last Touch" which is a formula I created that compares the Last Modify field with NOW().
I have been told I need an Apex trigger to do this, but as a newbiew to Apex and Salesforce administration tasks I need help. Is this something simple to implement or shoud I just give up?
Any help would be greatly appreciated!
https://help.salesforce.com/HTViewSolution?id=000171151
You can use below mentioned code to update case when a task/call log is inserted.
You would have to customize this logic to fit your need.
trigger CaseUpdateonTaskInsert on Task (after insert)
{
List<Case> lstCase = new List<Case>();
for(Task T : Trigger.New)
{
if(T.WhatId != null && string.valueof(T.WhatId).startsWith('500'))
{
Case cs = new Case(id=T.WhatId);
lstCase.add(cs);
}
}
update lstCase;
}
Regards
Akhil Tandon