• Thomas Miller 18
  • NEWBIE
  • 0 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
Recently I found out that when an email is sent from the global action only an EmailMessage record is created but no task record.
As our org heavily works with emailmessages and associated task records I tray to fill this gap using an automation. However to do this I would need to find out whether an EmailMessage record I see in a flow or trigger is coming from a global action or not. 
Is there a way to find out?
(Note that looking at ActivityId is not enough because in some cases Emailmessage and Task records are created in parallel and asynchronously.)
Inline Edit and Territory Assignment Rules
When you inline edit an account and save, territory assignment rules cannot be enforced. Unfortunately even in an APEX trigger you cannot trigger the rules.
A possible solution seems to be to fire a web service call from the trigger which does a second update and requires territory assignment rules to be run.
 
Has anyone written working APEX code for this scenario and can share the relevant code snippets?
Recently I found out that when an email is sent from the global action only an EmailMessage record is created but no task record.
As our org heavily works with emailmessages and associated task records I tray to fill this gap using an automation. However to do this I would need to find out whether an EmailMessage record I see in a flow or trigger is coming from a global action or not. 
Is there a way to find out?
(Note that looking at ActivityId is not enough because in some cases Emailmessage and Task records are created in parallel and asynchronously.)