Question Status

Unanswered
SLIM Maia asked a question on 9 Jan 2013 5:02 PM

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.

 

 

Reply
thecrm guy responded on 10 Jan 2013 3:29 AM

Change this pcontact[0] = new Object;

to this

 

pcontact[0] = new Object();

thecrmguy

Reply
SLIM Maia responded on 12 Jan 2013 7:42 AM

Thank you for your answer...

I did find the problem!

It was related to:

pcontact[0].entitytype= "contact";

Should be:

pcontact[0].entityType= "contact";

Reply