Back

Change of sequence number on fields and the consequences of it

Creation of templates in Global Master Data Sync
Video 4/9
Play
Close
  • Helpful
  • Not helpful
  • Needs update
  • Technical error
An advanced video is for the experts, and it requires detailed knowledge about the specific area of Business Central. Advanced Watch "the details", if you need detailed knowledge about a specific topic. These videos are only relevant for particular users. The Details This video includes functionality from the app "Global Master Data Sync" which is available at Microsoft AppSource. Click to visit AppSource. Global Master Data Sync

Playlists  Manage

Log in to create a playlist or see your existing playlists.

Presenter: Dennis Schumacher, Sr. Business Central Cons.

When you synchronize VAT posting setup data through a data template in Business Central, the system processes fields in the order of their field numbers. This can cause errors when a field with a lower field number depends on a field with a higher number. You fix this by adding a sequence number to the field that needs to be processed last.

In the VAT posting setup, the VAT percentage has field number 4 and the VAT identifier has field number 13. Because the synchronization follows field numbers, the system tries to set the VAT percentage before the VAT identifier. If the VAT identifier is still blank at that point, you get an error.

To control the order, you set the data template to under development, add a sequence number to the VAT percentage line, and set the template back to released. The field with a sequence number gets synchronized after all the other fields.

Why the field number order can cause errors

When you synchronize data through a data template, the fields are normally processed in the order of their field numbers. That works in most cases, but not always. Sometimes the order in which a person would type the values into a page differs from the order the field numbers dictate.

The VAT posting setup is a good example. On the page, the VAT identifier is shown before the VAT percentage, which is the order you would normally enter the data. In a setup like this, you may have a line with a blank VAT identifier.

The VAT percentage is field number 4 and the VAT identifier is field number 13. Because synchronization runs by field number, the system tries to set the VAT percentage first, before the VAT identifier. If the VAT identifier is still blank when the VAT percentage is written, you get an error. This is the same error you would see if you tried to enter the values in that order manually on the page.

How to change the synchronization order with a sequence number

You can control the synchronization order by adding a sequence number to a field on the data template line. A field with a sequence number is synchronized after the fields that follow the normal field number order.

Here is how to do it for the VAT posting setup:

  • Open the data template for VAT posting setup.
  • Set the data template to under development so you can edit it.
  • On the VAT percentage line, add a sequence number, for example 1.
  • Set the data template back to released.

You can add sequence numbers to several fields if you need to, but in this case you only need it on the VAT percentage. With the sequence number in place, the VAT percentage is synchronized at the end, after all the other fields, including the VAT identifier. That avoids the error.

Q&A

In what order does a data template synchronize fields?

By default, a data template synchronizes fields in the order of their field numbers, from lowest to highest.

Why do I get an error when synchronizing VAT posting setup data?

The VAT percentage is field number 4 and the VAT identifier is field number 13. Because synchronization runs by field number, the system tries to set the VAT percentage before the VAT identifier. If the VAT identifier is still blank at that point, you get an error, the same error you would see if you entered the values in that order manually.

How do I change the order in which fields are synchronized?

Add a sequence number to the field on the data template line. To do this, set the data template to under development, add the sequence number, and set the template back to released. The field with a sequence number is synchronized after all the other fields.

Can I add sequence numbers to more than one field?

Yes, you can add sequence numbers to several fields. For the VAT posting setup example, you only need it on the VAT percentage.

662231815-H5hWWrZVg5g-ENG21110804