Microsoft Dynamics 365 Business Central: How to Export and Import Data (Using Configuration Packages)

Dynamics 365 Business Central

Hi Readers.
Today I want to discuss the feature that will always be used when introducing Business Central, Configuration Packages.
Configuration Packages is an alternative method to “Edit in Excel” to upload lots of data into Microsoft Dynamics 365 Business Central. This was called “RapidStart” in the Navision days.

This feature is a little bit more controlled and flexible then the “Edit in Excel” functionality. Let’s see how to use it and precautions for use.

To create a configuration package

1.  Enter Configuration Packages in tell me, and then choose the related link.

2. Choose the New action.

3. On the General FastTab, fill in the fields as appropriate. Hover over a field to read a short description.

Note:
To exclude the configuration questionnaires, configuration templates, and configuration worksheet tables from the package, select the Exclude Configuration Tables check box. Otherwise, these tables will be added to the list of package tables automatically when you export the package.

4. Add tables directly.
Click …

Search the table name you want to import or export and select it, then choose OK.

If you know the table number in advance, you can enter it directly.

If the fields in the table have related tables, the warning message will be shown.
You can choose Yesto check them.

After the tables are successfully added, the values in the following four fields will be automatically displayed.
No. of Fields Available: Specifies the count of the number of fields that are available in the migration table.
No. of Fields Included: Specifies the count of the number of fields that are included in the migration table.
No. of Fields to Validate: Specifies the number of fields to validate. The count of the number of fields to validate is based on how many fields in the table have the Validate Field check box selected.
No. of Database Records: Specifies how many database records have been created in connection with the migration.

PS:
You can click the number in No. of Database Records field directly or choose Table -> Package Data to check the data in Business Central.

5. Select the fields that you want to include from a table
Choose Table -> Fields

You can use Set Included and Clear Included to select or deselect the fields.

Click Edit List twice to select fields individually. (Is it a bug?)
Note: The fields and sorting you set here will be the fields and sorting used in import and export. Please only select the required fields here. In other words, choose as few fields as possible.

No. of Fields Included and No. of Fields to Validate will be changed after you set the fields.

6. Filter your dataset
Choose Table -> Filters

Specify the appropriate filter values
For example: No. <> *S

Filtered will be checked.

7. Export to Excel
There are two Export to Excel action buttons on this page, one on the header and the other one on the lines.
(The Import to Excel and Apply Data mentioned later are the same.)

On the lines:
You can export the tables only selected.

Please note that the Item table only exports filtered data.

On the header:
You can export all the tables on the lines.

In the exported excel, the Business Central tables will be divided into individual sheets.

The data export ends here.

8. Import from Excel
Create some data in the exported Excel template.
For example:

Choose Package -> Import from Excel

Choose the excel file you want import.

Note:

Data in the Excel file will be imported for the following packages and tables:
Review the package codes and tables in the list. If a configuration package with this code does not exist, it will be created. If it does exist, its data may be overwritten.

Choose Import.

After the import is complete, you can see the values in No. of Package Records field will be automatically displayed.

You can click the number directly or choose Table -> Package Data to check the data you have imported.

If there is a problem with the data, you can directly correct it here.

Note:
Until now, the data has not really been written into the database, it is just stored in the configuration packages. Therefore, if you go to a copy company at this time, these intermediate data will also be copied.

9. Apply data
Choose Actions -> Functions -> Apply Package

Choose Yes.

Working on it…

Completed.

After Apply is complete, you can find the changes in No. of Package Records and No. of Database Records.

Finally you can open the actual page to confirm the data.
Payment Terms:

Shipment Methods:

Items

10. Error handling
Sometimes it is not so smooth when importing data and applying data. For example, you insert a value that is not in the relation table. And tables with different primary keys and fields with different data types will also not successfully import.

When there is a error with the data, this line will be displayed in red to remind you to pay attention to it.

You can click the number in No. of Package Errors field.

Choose Show Error.

You can find the error details.

After you manually fix the record, the number of errors will disappear.

Other Error:

The process involved is a little more technical then Edit in Excel. But at the same time, it is more flexible and quicker to upload data using configuration packages.
Once you set it in Business Central, you are ready to go. You can create a custom import package for your frequently updated data and high transaction.

Other tips of Configuration Package

1. Tables That Contain Posted Entries
You cannot import data to tables that contain posted entries, such as the tables for customer, vendor, and item ledger entries, so you should not include this data in your configuration package. You can add entries to these tables after you import the configuration package by using journals to post the entries.
When you apply the data to the database, error message will be shown.

2. Use Get Tables to create a new Configuration Package.
You may have noticed the function of Get Tables a long time ago, because in Microsoft Docs, it is used to create a new Configuration Package.

But when you try to select tables, you can’t find any tables. Why?

Because you have to add tables in Configuration Worksheet first.
For Example:

I added some tables. Please make sure that Package Code is empty.

Return to select tables, You will find that you can see the tables and select it.

After closing, the number of tables you selected will be shown.

You can choose the table with data only. Then choose OK.

Tables will be added automatically.

3. Dimensions as Columns
This is a very good feature. When you select the Dimensions as Columns check box, the dimensions are included in the Excel worksheet that you create for configuration. You can add or modify dimension values directly in the excel. And it cannot be done with Edit in Excel.

4. Delete Table Records Before Processing
When you select the Delete Table Records Before Processing check box, before the data is applied, the existing data in the table will be cleared.

5. This feature also supports customized additional tables (PTE & AppSource Extension)

6. Permissions
The process of creating and importing a configuration package involves the following effective permissions for all tables in the package:
・The user who exports data for the configuration package must have Read effective permissions.
・The user who imports the configuration package must have Insert and Modify effective permissions.

I personally recommend using the ID with Super permission to use this feature.

7. Export and Import a configuration package
In addition to Excel file, configuration package also supports another import and export format.
Choose the Export Package action.
The package is created in a .rapidstart file, which delivers the package contents in a compressed format.

You can import it into other environments.

8. Copy a configuration package
After you have created a package that meets most of your needs, you can use it as a basis for creating similar packages.

END

Find out more about Configuration Packages from Microsoft Docs.

Hope this will help.

Thanks.

ZHU

コメント

Copied title and URL