CRM 2011: BLOCKED SCRIPT set email to (partylist)

This question is not answered

Hello all,

With JScript, i´m trying to change the "to" in an email activity to fill it with 1 contact; however i´m not getting any luck,,,

This is what i have so far:

 

 

var acontacts = Xrm.Page.getAttribute("to");

var pcontact = new Array();

pcontact[0] = new Object;

   pcontact[0].id = new_contact;

   pcontact[0].name = "Name of the contact";

   pcontact[0].entitytype= "contact";

  pcontact.ParticipationTypeMask =1;

   acontacts.setValue(pcontact);

 

In new_contact i have the guid of the contact.

This is running onload.

What i´m i missing?

Can anyone help?

Thanks.

 

 

All Replies
  • Change this pcontact[0] = new Object;

    to this

     

    pcontact[0] = new Object();

     

     Deeps Mehta

    Dynamics CRM Consultant

  • Thank you for your answer...

    I did find the problem!

    It was related to:

    pcontact[0].entitytype= "contact";

    Should be:

    pcontact[0].entityType= "contact";