Skip to content

Latest commit

 

History

History
54 lines (38 loc) · 2.24 KB

File metadata and controls

54 lines (38 loc) · 2.24 KB
title description ms.custom ms.date ms.reviewer ms.suite ms.tgt_pltfrm ms.topic applies_to ms.assetid caps.latest.revision author ms.author search.audienceType
Sample: Promote an email message | MicrosoftDocs
This sample shows how to create an email activity instance from the specified email message in Dynamics 365 Customer Engagement by using the DeliverPromoteEmailRequest message
10/31/2017
pehecke
sample
Dynamics 365 Customer Engagement (on-premises)
69763a0a-af67-48b8-adf2-470c1cdf6196
22
JimDaly
nabuthuk
developer

Sample: Promote an email message

This sample shows how to create an email activity instance from the specified email message by using the DeliverPromoteEmailRequest message. You can download the sample from here.

[!includecc-sample-note]

How to run this sample

[!includecc-how-to-run-samples]

What this sample does

The DeliverPromoteEmailRequest message is intended to be used in a scenario where it contains data that is needed to create an email activity record from the specified email message.

How this sample works

In order to simulate the scenario described in What this sample does, the sample will do the following:

Setup

Checks for the current version of the org.

Demonstrate

  1. Creates a contact to send an email to (To: field).
  2. The WhoAmIRequest retrieves the system user to send the email (From: field).
  3. The DeliverPromoteEmailRequest message creates the request and also executes it.
  4. Verify the success by defining anonymous types that define possible values for email status.
  5. Queries the delivered email, and verify the status code is sent.

Clean up

Display an option to delete the records created in Setup. The deletion is optional in case you want to examine the entities and data created by the sample. You can manually delete the records to achieve the same result.

[!INCLUDEfooter-include]