How to Setting the Queue as Email Responder on Emails in Dynamics 365

Fredrik Engseth
10 min readMay 11, 2023

Email management is a critical aspect of business communication, and automating email responses can significantly improve productivity. In Dynamics 365, you have the flexibility to customize and set the queue as the email responder, ensuring that emails are sent from the appropriate queue. This blog post explores two different scenarios for achieving this functionality using JavaScript and the Dynamics 365 Web API.

Setting the Stage

Before diving into the code, let’s provide a brief overview of the scenarios we’ll be addressing. In Dynamics 365, when dealing with email entities, there are two important concepts: the regarding record and the email sender. The regarding record represents the object (e.g., contact, account, case) with which the email is associated, while the email sender denotes the entity (e.g., user, queue) responsible for sending the email. Our goal is to automatically set the queue as the email sender based on either the queue that a case was added to or the queue that an incoming email was sent to.

Prerequisites

Before we proceed with the implementation, make sure you have the following:

  • Access to a Dynamics 365 environment
  • Administrator or customizer privileges to modify entity forms and add JavaScript code

Scenario 1: Setting the Queue as Email Sender for Cases

--

--

Fredrik Engseth

Developer | Dynamics 365 | Power Platform | Azure | Personal development | Investments | ☕ https://www.buymeacoffee.com/fredrikengseth