You need to sign in to do that
Don't have an account?
Stop calculating Case Age in Business Hours when case is in a pending state.
Hi all,
I have to calculate the total time spent on a case. We have 5 status called new open pending working closed. So when ever the status is in working then the time is not supposed to be calculated. For this I have written a trigger which subtratcs the waiting time from total time. But looks like I had a problm.
Error: Invalid Data.
Review all error messages below to correct your data.
Apex trigger caselifetimecalculator caused an unexpected exception, contact your administrator: caselifetimecalculator: execution of BeforeUpdate caused by: System.NullPointerException: Attempt to de-reference a null object: Trigger.caselifetimecalculator: line 6, column 1
Her is my code
I guess total_activity_time__c is null for the first time, so just add another condition to check if total_activity_time__c is null.
Also, there is a free appexchange app named Case Age In Business Hours which meets the same requirement.
All Answers
I guess total_activity_time__c is null for the first time, so just add another condition to check if total_activity_time__c is null.
Also, there is a free appexchange app named Case Age In Business Hours which meets the same requirement.
Thanks dude, looks like the app is coming with apex code. I could use it or even base it for any code modifications. Thanks a bunch