5

I've been thinking about using the "Status" field on EmailMessage for this. However I noticed that when the user accesses the email page the record has its status updated from 0 to 1 (unread to read), but the trigger on the Email Message object isn't run.

Is there a way to distinguish cases with unread emails from the ones with all messages read?

2

Best solution I've seen so far is a scheduled apex class that just goes through all cases and updates status rather than relying on a trigger.

0

There is no perfect solution but a simple approach can be used by using Flows.This can be done by creating a boolean field on case object and mark that as checked whenever new email is received on the case by using after insert flow. Also, we can put a screen flow on case object page so that it again marks the boolean as false when user opens that case to review emails. check out example solution here: https://www.accidentalcodersf.com/2020/10/use-flows-to-track-unread-emails-on-cases.html

1
  • This is not a good solution either, because there are limits on flow executions. For orgs with many users this would not work. Oct 18 '20 at 19:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.