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 |
|
69763a0a-af67-48b8-adf2-470c1cdf6196 |
22 |
JimDaly |
nabuthuk |
|
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]
[!includecc-how-to-run-samples]
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.
In order to simulate the scenario described in What this sample does, the sample will do the following:
Checks for the current version of the org.
- Creates a contact to send an email to (To: field).
- The
WhoAmIRequest
retrieves the system user to send the email (From: field). - The
DeliverPromoteEmailRequest
message creates the request and also executes it. - Verify the success by defining anonymous types that define possible values for email status.
- Queries the delivered email, and verify the status code is
sent
.
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]