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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Set e-mail sender by JavaScript 2013

(0) ShareShare
ReportReport
Posted on by

Hi guys.

I want to be able to reply to a mail with the same address that was used by the people who sent it to me (ex: info@mycompany.com)

I already know how to change it directly by JavaScript:

First, i get the associated queue email data, on the original mail:

var array1 = new Array();

array1 = Xrm.Page.getAttribute("to").getValue();

And then set the "From" value to the same i got in the previous form:

var value = new Array();

value[0] = new Object();

value[0].name = '<mailQueueSomething>';

value[0].id = "{xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}";

value[0].entityType = "queue";

Xrm.Page.getAttribute("from").setValue(value);

BUT, the PROBLEM is, since JavaScript isn't "dynamic", i can't get the "To" value from the received mail directly to my "From" value to the reply email i'm gonna make, i have to do it on 2 seperate Form's.

Any ideas on doing this automatically?

Thanks in advance

*This post is locked for comments

I have the same question (0)
  • Surmeet Singh Profile Picture
    3,075 on at

    Hi,

    you can create a button which will open a new Email form and pass the To data in the querystring.

    The extra effort will be in creating a new lookup and setting it from Query string.

    On new email a js must run which will fetch data from the new lookup and insert it into to field.

  • Community Member Profile Picture
    on at

    GUIDO PREITE, sorry for the confusion, let me reformulate my problem:

    I have a "Customer Service" e-mail address, which is assigned to a "Customer Service"-queue, so all e-mails are automatically added to the queue. When an employee replies to an e-mail in the "Customer Service"-queue, the sender address of the e-mail will default to the employee. However, i'd like the sender address to default to the "Customer Service"-queue. It is of course possible to search/select the correct "Customer Service"-queue as the sender, but this is a manual process for the employee, so there is a chance of this not being done every single time.

    I have looked into automatically changing the sender address by the process i mentioned above, but since i have multiple queues like the "Customer Service", such as "Accounting" and "Info", it is hard to guess which should be assigned as the sender of a random e-mail.

    Thanks

  • Community Member Profile Picture
    on at

    SURMEET SINGH, how exactly can i "create a button which will open a new Email form and pass the To data in the querystring" ?

    Thanks

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans