I have a formula field (Hours_After_Case_Updated__c) which calculates hours after the the case was last modified excluding weekends (Saturday and Sunday). I want to trigger a time based workflow which triggers if the formula field is greater than or equal to 24 hours and if the case is open. Workflow action : Email Alert
I tried using the following rule criteria:
AND(
OR (ISPICKVAL(Status, 'New'), ISPICKVAL(Status, 'In Progress')),
Hours_After_Case_Updated__c >=24
)
And used Time Trigger as:
But workflow is not working.
Formula for calculating Hours_After_Case_Updated__c is as follows :
ROUND( 24 * (
( 5 * FLOOR( ( DATEVALUE( NOW() ) - DATE( 1900, 1, 8) ) / 7) +
MIN(5,
MOD( DATEVALUE( NOW() ) - DATE( 1900, 1, 8), 7) +
MIN( 1, 24 / 24 * ( MOD( NOW() - DATETIMEVALUE( '1900-01-08 7:00:00' ), 1 ) ) )
)
)
-
( 5 * FLOOR( ( DATEVALUE( LastModifiedDate ) - DATE( 1900, 1, 8) ) / 7) +
MIN( 5,
MOD( DATEVALUE( LastModifiedDate ) - DATE( 1996, 1, 1), 7 ) +
MIN( 1, 24 / 24 * ( MOD( LastModifiedDate - DATETIMEVALUE( '1900-0107:00:00' ),
1) ) )
)
)
),
0 )