Business Central 2026 release wave 2 (BC29): Migrate table fields from Integer to BigInteger (Support for BigInteger field migration)

Dynamics 365 Business Central

Hi, Readers.
The public preview for Dynamics 365 Business Central 2026 release wave 2 (BC29) is available. Learn more: Link.

I will continue to test and share some new features that I hope will be helpful. In this post, I would like to talk about Migrate table fields from Integer to BigInteger (Support for BigInteger field migration).
Migrate table fields from Integer to BigInteger:

Increase an existing table field from Integer to BigInteger while receiving compiler and analyzer warnings for dependent expressions that might narrow or overflow values.

https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/whatsnew/whatsnew-update-29-0?wt.mc_id=DX-MVP-5004336

AL changelog:

The compiler now supports gradual migration between Integer and BigInteger field types:

1. Field type changes (Integer → BigInteger): Changing an existing table field from Integer to BigInteger is now supported when targeting runtime version 18.0 (Fall 2026) or later. A new AppSourceCop rule (AS0141) warns about the potential consequences for dependent extensions that reference the field.

2. Property context warnings: When referencing a BigInteger field in property contexts (TableRelation, CalcFormula WHERE clauses, etc.), the compiler emits warnings for narrowing conversions (BigInteger → Integer) to alert about potential overflow at runtime.

Key behaviors:

  • Field upgrades: Integer → BigInteger changes are allowed in upgrade scenarios
  • Property warnings: BigInteger → Integer,Option,Enum conversions in WHERE clauses emit warnings about potential overflow
  • CalcFormula support: LOOKUP, MAX, and MIN operations allow Integer ↔ BigInteger conversions with appropriate warnings for narrowing conversions

This is quite simple. Even when schemaUpdateMode is set to Synchronize (Add), you can convert an Integer data type to a BigInteger data type without encountering any errors.
Integer data type: Stores whole numbers with values that range from -2,147,483,647 to 2,147,483,647.
BigInteger data type: Stores very large whole numbers that range from -9,223,372,036,854,775,807 to 9,223,372,036,854,775,807.

For example,

Done. This will not cause any data loss.

However, please note that the reverse is not allowed: converting BigInteger to Integer will cause an error. (The error message was in Japanese, so I translated it briefly)

[2026-09-29 14:13:45.93] The request for path /v2.0/Sandbox285/dev/apps?tenant=7e47da45-7f7d-448a-bd3d-1f4aa2ec8f62&SchemaUpdateMode=synchronize&DependencyPublishingOption=default failed with code UnprocessableEntity. Reason: ‘次のエラーが発生したため、’YUN ZHU’ による拡張機能 ‘BC28P’ (バージョン ‘1.0.0.0’) をテナント ‘msasia4477t46178317’ のためにインストールできませんでした: Table 50140 ZY Book :: フィールド ‘Page Count’ のデータ型が ‘NavBigInteger’ から ‘NavInteger’ に変更されました。フィールドのデータ型の変更は許可されていません。’ により公開に失敗しました。元の拡張機能が復元されました。

[2026-09-29 14:13:45.93] The request for path /v2.0/Sandbox285/dev/apps?tenant=7e47da45-7f7d-448a-bd3d-1f4aa2ec8f62&SchemaUpdateMode=synchronize&DependencyPublishingOption=default failed with code UnprocessableEntity. Reason: ‘Publishing failed due to the following error: Could not install extension ‘BC28P’ (version ‘1.0.0.0’) by ‘YUN ZHU’ for tenant ‘msasia4477t46178317’: Table 50140 ZY Book :: The data type of field ‘Page Count’ was changed from ‘NavBigInteger’ to ‘NavInteger’. Changing field data types is not allowed. The original extension has been restored.’

Great, give it a try!!!😁

END

Hope this will help.

Thanks for reading.

ZHU

コメント

Copied title and URL