web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

How to automatically put shared mailbox address in "From" field when sending emails

(1) ShareShare
ReportReport
Posted on by 6
Hi, 
 
I've only very recently created a model driven app using Dynamics customer service functionality. 
The main purpose of this app as a small-scale case management tool.
We have already gotten our shared mailbox set up. However, when I click to create a new email, my email always pop up in the "From" field rather than our preferred shared maibox address. 
 
Is there any way to alter this?
I am sure I am not the first to think of this, however I'm not very good at wording my Dynamics questions correctly yet, so any tips on blogs/other resources on how to make Model driven apps better for case management is much appreciated!

Best, 
Ida
I have the same question (0)
  • idanorin Profile Picture
    6 on at
    How to automatically put shared mailbox address in "From" field when sending emails
    Thank you @Jimmy Passeti | MVP,  @Mahendar Pal and @Amit Katariya007!

    With the information the three of you provided (along with this youtube video Web resources and Insert Java script code in the Model driven app - Power Apps) I finally figured out how to do it. 
     
    Extra big thanks to you, Jimmy, for providing the code as well. I am so green at JavaScript, so that was immensely helpful.
     
     
    @BenjaminColeman yes, with Jimmy's code snippet, and the additional information, it was way easier than I had feared.
    Best of luck to you!
     

    Edit: I am attempting to mark your reply Jimmy as the solution, however whenever I reload the spot is unchecked. Will try again later. Any tips are welcomed :')
  • BenjaminColeman Profile Picture
    10 on at
    How to automatically put shared mailbox address in "From" field when sending emails
    have you managed to resolve this issue?
  • Suggested answer
    Amit Katariya007 Profile Picture
    10,409 Super User 2025 Season 2 on at
    How to automatically put shared mailbox address in "From" field when sending emails
    Create a plugin which will run on Pre operation of email entity. Then populate the from field as per your requirement.
     
  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at
    How to automatically put shared mailbox address in "From" field when sending emails
    Hi,
     
    What you see is the default system behavior which auto populate from lookup with the current user, if you want to change this you can create web resource and use script to auto populate this field so for example if you can setup a queue where you can use your shared email address and then using script you can populate queue under from field.
     
     
    You need to call your java script method on load.
     
     
  • Verified answer
    Jimmy Passeti Profile Picture
    599 Most Valuable Professional on at
    How to automatically put shared mailbox address in "From" field when sending emails
    Hello,
     
    This can be done using JavaScript.
     
    Below is an example of that, Imagining a scenery in which the email will be sent by a queue.
    function _setFromUser() {
        var QueueID = "00000000-0000-0000-0000-000000000000";
        var recordName = "Queue Name";
        var entityName = "queue";
        Xrm.Page.getControl("from").getAttribute().setValue([{ id: QueueID, name: recordName, entityType: entityName }]);
    }
    Regards,
    Jimmy Passeti | Microsoft MVP
    ✅ Please mark as Verified if this answered your question!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 258

#2
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 179

#3
Tom_Gioielli Profile Picture

Tom_Gioielli 127 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans