Naming guidelines and AL object ranges

When creating extensions for Dynamics 365 Business Central, you need to assign a numerical ID to your objects. The rules for assigning object IDs are as follows:

Range

Purpose

0 – 49,999

Business Central base application. It cannot be used by partners.

5,0000 – 99,999

Per-tenant extensions (resellers who want to customize the delivered solution to the individual needs of a customer).

80,000 – 99,999

Extended objects that you have to modify the permissions of in your development license.

100,000 – 999,999

Reserved for localizing Dynamics 365 Business Central for a specific country or region. It cannot be used by partners.

1,000,000 – 69,999,999

Registered Solution Program (RSP) range.

70,000,000 – 74,999,999

Business Central SaaS apps (AppSource).

 

Regarding file naming, each .al filename must start with the corresponding object type prefix and object ID and must be written only with characters [A-Za-z0-9]. The file naming notation (which is mandatory for AppSource) should be as follows:

  • Full objects: <ObjectNameExcludingPrefix>.<FullTypeName>.al
  • Extension objects: <ObjectNameExcludingPrefix>.<FullTypeName>Ext.al

For each object type, you can use the following abbreviation (prefixes):

Object Type

Abbreviation (prefix)

Page

Page

Page Extension

PageExt

Page Customization

PageCust

Codeunit

Codeunit

Table

Table

Table Extension

TableExt

XML Port

Xmlport

Report

Report

Query

Query

Enum

Enum

Enum Extension

EnumExt

 

As an example, here are some AL objects and their corresponding filenames:

  • Table 50100 Book should be called Book.Table.al
  • Page 50100 Book Card should be called BookCard.Page.al
  • Codeunit 50110 Book Management should be called BookManagement.Codeunit.al
  • Pageextension 50101 MyCustomerCardExt, which extends Customer Card, should be called CustomerCard.PageExt.al

You should also use a prefix/suffix to target your objects (reserved for you by Microsoft, as we'll explain later). This allows you to have objects that are named in a unique way between extensions, which avoids naming conflicts.

The rules for using the prefix/suffix are as follows:

  • The prefix/suffix must be at least three characters long.
  • The object/field name must start or end with the prefix/suffix.
  • When you modify a core Dynamics 365 object using a table extension or a page extension, the prefix/suffix must be defined at the control/field/action/group level.
  • Use a caption to handle the label that you want in the UI.

For example, if you have reserved the PACKT prefix and you want to create a field called CustomerCategory, the valid field names that you can use are as follows:

  • PACKTCustomerCategory
  • CustomerCategoryPACKT
  • CustomerCategory_PACKT
  • CustomerCategory PACKT

If you want to create the Customer Category table, the valid names for the table object are as follows:

  • table 70000000 PACKT Customer Category
  • table 70000000 Customer Category PACKT
  • table 70000000 Customer Category_PACKT

Using the reserved name as a prefix or a suffix is absolutely your choice. We prefer to use it as a suffix because it's more natural to find the field with Visual Studio IntelliSense (if the field that appears to you in the UI is Customer Category, typing these words will present the real field name, along with its suffix).

These guidelines are mandatory for AppSource, but are not mandatory for your per-tenant extensions. Our suggestion is to always follow these guidelines.

To register a prefix/suffix for your objects, you need to send an email to [email protected] specifying the name you want to reserve for your app. Remember that the prefix/suffix should be app-based and not company-based.

..................Content has been hidden....................

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