title | description | keywords | ms.date | ms.custom | ms.topic | applies_to | ms.assetid | author | ms.author | ms.reviewer | ms.suite | ms.tgt_pltfrm | topic-status | search.audienceType | ||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Sample: Initialize a record from an existing record (Developer Guide for Dynamics 365 Customer Engagement)| MicrosoftDocs |
This sample shows how to use the IOrganizationService.InitializeFromRequest message to create new records from an existing record |
01/08/2020 |
sample |
|
1d0d6df3-e905-4b63-beaa-3f72f73bfa17 |
JimDaly |
jdaly |
pehecke |
Drafting |
|
This sample shows how to use the IOrganizationService.InitializeFromRequest message to create new records from an existing record. You can download the sample from here.
[!includecc-sample-note]
[!includecc-how-to-run-samples]
The IOrganizationService.InitializeFromRequest
message is intended to be used in a scenario where it contains the data that is needed to initialize a new record from an existing record.
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.
- The
CreateRequiredRecords
method creates any entity records that this sample requires.
- The
InitializeFromRequest
method creates the request and set properties for the request object. - The
InitializeFromResponse
method executes the request.
Display an option to delete the sample data that is 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]