locked
Bug? CRM2013 Contact Create New Email does not fill [To] field RRS feed

  • Question

  • When creating a new email from a contact form using the new Activities ... Email construction I would expect the contact to be auto-populated in the [To] field... instead the contact name is populated in the subject field

    Same issue trying to email from an account context

    Any workaround please?

    Thanks, Chris

    Friday, December 6, 2013 1:03 PM

All replies

  • Hi,

    you can get the on the formload your contact of the "Subject-Field". After this you can set it via jscript to the "To-Field".

    Karan

    Friday, December 6, 2013 1:13 PM
  • With this code, you can set a party list:

    function setPartyList() {

    var partyRequired = Xrm.Page.getAttribute(“requiredattendees”);

    // Create new array

    var partlist = new Array();

    partlist[0] = new Object();

    partlist[0].id = id; //Guid (i.e., Guid of User or Contact etc)

    partlist[0].name = name; //Name (i.e., Name of User or Contact etc)

    partlist[0].entityType = entityType; //entity schema name of account or contact

    // Set array value

    partyRequired.setValue(partlist);

    }

    Hope this helps!

    Karan

    Friday, December 6, 2013 1:17 PM
  • Obviously they are different data types but I have found that you can do:

    var Regarding = Xrm.Page.getAttribute('regardingobjectid').getValue();

    var To = Xrm.Page.getAttribute('to');

    if(Regarding && To) To.setValue(Regarding);

    Friday, December 6, 2013 1:48 PM