Dynamics 365 Business Central: How to use Configuration Package to post documents (Sales Order, Purchase Order, Transfer Order, General Journal, etc.)

Dynamics 365 Business Central

Hi, Readers.
When importing the opening balance to Business Central by Configuration Package, you cannot import the posted data directly, such as Posted Sales Invoices, Customer Ledger Entries, General Ledger Entries, etc., so you should first import the data before posting, such as Sales Order, General Journal, etc., and then do Post from the page. This is a very common practice.

If you have tried importing a predefined package and apply it on the Configuration Packages page, you may have noticed that when applying the package, part of the data is automatically posted.

For example, W1.ENU.EVALUATION package.

Importing package…

Apply Package.

Invoices will be automatically posted.

How is this done?
This time we need to use Processing Rules on the Configuration Package Card page.
Microsoft does not have a lot of documentation for Processing Rules. But Microsoft’s configuration packages for the evaluation companies set processing rules on the Sales Header and Purchase Header tables. So we can refer to them.

Open W1.ENU.EVALUATION package.

Select Sales Header (36) table line and choose Processing Rules action.

Then you can see Config. Table Processing Rules page.

Action: Specify the relevant action in the Action field.

Note: For different tables, the Actions that can be used are different.

Validation Results
Action must not be Post in Config. Table Processing Rule Package Code=’W1.ENU.EVALUATION’,Table ID=’36’,Rule No.=’10000′.

You can find this part of the control code in the base application.

ActionTable
CustomAll
PostGen. Journal Line (81)
Gen. Journal Batch (232)
Item (27)
InvoiceSales Header (36)
Purchase Header (38)
ShipSales Header (36)
Transfer Header (5740)
ReceivePurchase Header (38)
Transfer Header (5740)

Filter: To apply filters on data, choose the Processing Filters action, and then fill in the fields.

You can add multiple filters.

Custom Processing Codeunit ID: To add a processing codeunit, specify it in the Custom Processing Codeunit ID field.
Note: This codeunit must take table 8614 Config. Package Record as a parameter on the OnRun method.

Okay, let’s do a simple test.

Create a new Configuration Package, import and post sales orders (Sales Header and Sales Line)

Action: Invoice
Filter: Document Type==Order

Sales Header (Excel): Only post Document Type = Order.

Sales Line (Excel):

Test Video:

Isn’t it so convenient? Give it a try.

END

Hope this will help.

Thanks for reading.

ZHU

コメント

Copied title and URL