Announcements
Hi, the default behaviour when sending an email is for it to show as from the individual. I would like it to instead show as from the queue which the case is in. Is anyone aware of a way to do this dynamically based on queue?
I am aware there are some workarounds to create workflows or use JavaScript, but they do not dynamically set the queue. For context we have multiple queues so rather than sending "from" the fixed address of a particular queue I'd want the email to send as from the relevant queue the case is actually in?
Great solution thanks.
If we wanted to use the queue from regarding object if there was a queue, and if not use the Created By Users Default Queue, would that be easy to add to this script?
Hi Adam,
I think you will need to do additional customizations...probably save the queue email in a field in case...
and then load it when Email form is opened...
We have done something like this in Zap Helpdesk App too:
Blog: How New Enhancements (March 2020) to “Quick Email Reply” Section makes it faster for Support Agents to reply back to Customer when using Zap Helpdesk -Email to Case App for Dynamics 365 for Customer Service (link)
Blog: How to design a Customer Support process when using Dynamics 365 for Customer Service? (link)
Hi leo zhang
We have just come across your response as we have hit the same issue too but it does not seem to work if you manually convert emails from a Queue to a Case as the Case is no longer referenceable in the Queue once it is converted. How does your fix reference back to the Queue the Case was generated from?
Thank you this works perfectly!
Hi Partner,
You still could use JS to do this.
Please refer to the following code and add it on email form onLoad event.
function setQueue(executionContext) { var queueID; var queueName; var formContext = executionContext.getFormContext(); var regarding = formContext.getAttribute("regardingobjectid").getValue(); if (regarding != null && regarding != undefined) { var regardingType = regarding[0].entityType; var regardingID = regarding[0].id; regardingID = regardingID.substring(1, regardingID.length - 1); if (regardingType == "incident") { Xrm.WebApi.retrieveMultipleRecords("queueitem", "?$select=_queueid_value&$filter=_objectid_value eq " regardingID).then( function success(result) { for (var i = 0; i < result.entities.length; i ) { queueID = result.entities[i]._queueid_value; } Xrm.WebApi.retrieveRecord("queue", queueID, "?$select=name").then( function success(result) { queueName = result.name; var value = new Array(); value[0] = new Object(); value[0].id = queueID; value[0].name = queueName; value[0].entityType = "queue"; formContext.getAttribute("from").setValue(value); }, function (error) { console.log(error.message); } ); }, function (error) { console.log(error.message); // handle error conditions } ); } } }
And then when you create email from case timeline, the "From" will be set to the queue of the case automatically. It is dynamically, not special.
Best Regards,
Leo
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,802 Super User 2024 Season 2
Martin Dráb 229,133 Most Valuable Professional
nmaenpaa 101,154