Saturday, November 28, 2020

MSCRM Email Plugins C# with and Without CRM Reference

 // Create a new activity party linked to a contact

Entity party1 = new Entity("activityparty"); party1["addressused"] = "some@email.com"; party1["partyid"] = new EntityReference("contact", contactId); // Create a new unresolved activity party Entity party2 = new Entity("activityparty"); party2["addressused"] = "unresolved@email.com"; // Create a new EntityCollection and add the 2 parties EntityCollection to = new EntityCollection(); to.Entities.Add(party1); to.Entities.Add(party2); // Create an email with the EntityCollection Entity email = new Entity("email"); email["subject"] = "Test Party Lists"; email["to"] = to; Guid _emailid = service.Create(email);

    if (_emailid != Guid.Empty)
    {
        SendEmailRequest sendEmailreq = new SendEmailRequest
        {
            EmailId = _emailid,
            TrackingToken = "",
            IssueSend = true
        };

        SendEmailResponse sendEmailresp = (SendEmailResponse)service.Execute(sendEmailreq);
    }

No comments:

Post a Comment

Day 11 - Customizing Option Sets Dropdown Fields with JavaScript

  In this Blog, we will see how to Customizing Option Sets Dropdown Fields with JavaScript label1 = formContext.getAttribute( "bosch_op...