title | description | keywords | ms.date | ms.custom | ms.topic | applies_to | ms.assetid | author | ms.author | ms.reviewer | ms.suite | ms.tgt_pltfrm | caps.latest.revision | topic-status | search.audienceType | ||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Sample: Create, retrieve, update, and delete a chart (Developer Guide for Dynamics 365 Customer Engagement) | MicrosoftDocs |
The sample shows how to create, retrieve, update, and delete an organization-owned visualization. |
10/31/2017 |
sample |
|
51d4ecad-3c50-4f81-bfff-aa321d62cb2c |
JimDaly |
nabuthuk |
pehecke |
27 |
Drafting |
|
This sample shows how to create, retrieve, update, and delete an user-owned visualization using the following methods:
- IOrganizationService.Create
- IOrganizationService.Retrieve
- IOrganizationService.Update
- IOrganizationService.Delete
You can download the sample from here.
[!includecc-sample-note]
[!includecc-how-to-run-samples]
The IOrganizationService
message is intended to be used in a scenario where it contains data that provides programmatic access to the metadata and data for an organization.
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 entity records that is required for the sample.
- The
presentationXml
method sets the presentation XML string. - The
dataXml
method sets the data XML string. - The
newUserOwnedVisualization
method creates the visualization entity instance. - The
retrievedOrgOwnedVisualization
method retrieves the visualization. - The
newDataXml
method updates the name and the data description string.
Display an option to delete the records created in the 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]