Skip to main content
Hi All,

I have a requirement wherein we need to send an email to a group of users if cases is not assigned within 4 hours after it gets created.

  • The case is getting created in salesforce using Email-To-Case and assigned to Queue as default case owner.

I've written a SOQL query which gives case records that are updated in last 4 hours but not sure how we can get cases which are not updated or not have actioned in 4 hours after cases's created time.

 

List<Case> casesUpdatedInLastFourHours = [select id, Subject, LastModifiedDate from Case where LastModifiedDate = TODAY AND HOUR_IN_DAY(LastModifiedDate) > 4];

Any help or sugegstion is highly appreiciated.
4 个回答
  1. 2022年7月1日 10:39
    Hi Sujit,

    That is what the formula will do. If the record owner not changed untill 4 then workflow criteria will met and send the notifications to the respective user.

    Try that, it will work.

    Thanks!!
0/9000