This sample shows how to create an import map (data map) in Dynamics 365, export it as an XML formatted data, import modified mappings, and create a new import map in Dynamics 365 based on the imported mappings.
See How to run samples for information about how to run this sample.
See the text description in the Setup section as the program's primary functionality is performed during setup.
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
CreateImportMapping
method creates the import mapping record. - The
RetrieveMappingXML
method exports the mapping (Xml) that is created. - The
ChangeMappingName
method parses the Xml to change the name column. - The
ImportMappingsByXml
method creates a mapping from the (previously exported) Xml.
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.