Hi,
I'm getting the exception as ""Attribute 'partyobjecttypecode' cannot be NULL""
Guid contactid = new Guid("3E0ADDAC-6B7A-E611-97ED-00155DA0EF00");
WhoAmIRequest systemUserRequest = new WhoAmIRequest();
WhoAmIResponse systemUserResponse = (WhoAmIResponse)service.Execute(systemUserRequest);
Guid _userId = systemUserResponse.UserId;
Entity from = new Entity("activityparty");
from["partyid"] = new EntityReference("systemuser", _userId).Id;
Entity to = new Entity("activityparty");
to["partyid"] = new EntityReference("contact", contactid).Id;
//new EntityReference("contact", contactid);
// Create an e-mail message.
Entity Email = new Entity("email");
Email["from"] = new Entity[] { from };
Email["to"] = new Entity[] { to };
Email["subject"] = "CRM - Test mail";
Email["description"] = "Hi ";
Guid emailId = service.Create(Email); //Exception at this point.
SendEmailRequest reqSendEmail = new SendEmailRequest();
reqSendEmail.EmailId = emailId;
reqSendEmail.TrackingToken = "";
reqSendEmail.IssueSend = true;
SendEmailResponse res = (SendEmailResponse)service.Execute(reqSendEmail);
*This post is locked for comments