How to do it...

To import and export data using the Data Import/Export Framework, follow these steps:

  1. Open Dynamics 365 for Operations in Internet Explorer; use the following link on a Development virtual machine:

https://usnconeboxax1aos.cloud.onebox.dynamics.com/?cmp=USMF

  1. The first step, after making any change to the data entities, is to refresh the entity list. Open the Data management workspace, select Framework parameters, and click on Refresh entity list in the Entity settings tab page. This happens asynchronously, and you will get a message when it is complete; you may need to click in and out of forms for the message to appear.
  2. Next, we will need to check that the fields exist and are mapped correctly on the Data management workspace; click on Data entities.
  3. Type in Released products into the filter control and select Entity: "Released products" from the drop-down list.
  4. Click on Target fields and check that the field exists in the list. If not, you need to rebuild the project and synchronize the project to the database. A full build using Dynamics 365 | Build models may be required if this persists.
  5. Then, click on Modify target mapping. The grid may be empty, and if we haven't specified any specific mapping previously, we can use the Generate mapping button to create the default field mapping for us.
  6. If we have specified specific mapping in this previously, clicking on Generate mapping will delete it. You can click on New and complete the line, or use the MAPPING VISUALIZATION tab page. In this form, drag the field from the right-hand list to the corresponding field on the left.
  7. Now the mapping is done, let's export some data. On the Data management workspace, click on Export.
It may seem odd to export a data entity that is used to create data, but the following steps are used to create an import template used later in the recipe.
  1. Complete the form, as shown in the following table:

Field

Value

Name

ReleasedProductCreationExport

Target data format

EXCEL

Entity name

Released product creation

Skip staging

Yes

Default refresh type

Full push only

Select fields

All fields

  1. Once complete, click on Add entity.
  2. This creates a new tile. With this selected, click on Export from the top-button ribbon.
The message suggests that you refresh the page; it means that the refresh icon on the top-right of the form, not the browser refresh button.
  1. After some time, it will report that it succeeded. Click on Download package and say Yes to the message that follows.
  2. This downloads a ZIP file, which we can use as an import template.
  3. Copy the spreadsheet and, in the copy, remove all rows except the first two; as we will use the first product as a template to save having to look up valid values: we are only testing that it works for now.
  4. Change the ItemNumber and ProductNumber columns to X1000 (an item number that has not yet been used).
  5. Fill in the ConWHSAdditionalName column with something useful.
  6. Save to the Documents folder and close the spreadsheet.
  7. Go back to the Dynamics 365 for Operations client, and navigate back to the Data management workspace. Click on Import.
  8. Complete the fields as follows:

Field

Value

Name

ReleasedProductCreationImport

Source data format

EXCEL

Entity name

Released product creation

  1. Click on Import.
  2. Check the mapping by clicking on View map on the newly created tile, and note that the mapping is done for us.
  3. Locate the spreadsheet created earlier and press Open.
  4. Click on Upload.

  1. This can take a while on a development VM, so just be patient and click the form refresh button every so often. Eventually, you will get a tile as shown in the following screenshot:
  1. Click on View staging data and check that the Additional name field is completed. If not, the mapping was probably not completed correctly.
  2. After a short time later, the tile will change to show that the records are now in the target. Check this by opening the release products form; check that all fields were populated correctly.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.85.213