Dynamics 365 Business Central: The namespace ‘xxxx’ is unknown in CalcFormula Property

Dynamics 365 Business Central

Hi, Readers.
In this post, I would like to share a developing error handling of Business Central, “The namespace ‘xxxx’ is unknown” in CalcFormula Property.
This is a question I saw from the Dynamics 365 Community this morning. More details: AL Compilation error: “The namespace ‘TableName’ is unknown” when creating

This isn’t a very complicated question, but the error message is misleading. For example,

The namespace ‘Sales Line’ is unknown.AL AL0791

As you might know, AL for Business Central supports namespaces from Business Central 2023 wave 2 (BC23), more details: Business Central 2023 wave 2 (BC23): Segment AL code and reduce naming conflicts with namespaces (Namespaces in AL)
This error seems to be a namespace related error, but it is not entirely true. This is an issue with Flowfield’s CalcFormula Property settings. As we mentioned when we were discussing Dynamics 365 Business Central: FlowFields (Sum, Average, Exist, Count, Min, Max, Lookup). There are seven types of FlowFields. Each is described in the following table:

FlowField typeField typeDescription
SumDecimal, Integer, BigInteger, or DurationThe sum of a specified set in a column in a table.
AverageDecimal, Integer, BigInteger, or DurationThe average value of a specified set in a column in a table.
ExistBooleanIndicates whether any records exist in a specified set in a table.
CountIntegerThe number of records in a specified set in a table.
MinAnyThe minimum value in a column in a specified set in a table.
MaxAnyThe maximum value in a column in a specified set in a table.
LookupAnyLooks up a value in a column in another table.

For types Exist and Count, you do not need to enter the field name, only the name of the table. The following are two standard examples:
1. Exist: Comment in Item Table

2. Count: Bill-To No. of Orders in Customer Table

So there is no problem with the following

But you cannot add any fields, such as “No.”

Why? Because after supporting namespace, we can use namespace + table name like the following to point to the correct table. Because you added a field at the end, the system thinks that it is the table name and the one in front is the namespace, so this error is prompted.

And before namespace is supported, the following error is displayed.

Syntax error, ‘)’ expected AL AL0104

1. Dynamics 365 Business Central: What happens if users don’t have permission to read the table set in a FlowField?

2. Dynamics 365 Business Central: How to prevent users from clicking on a Flowfield field (Disable Flowfield Drill-downs)

3. Dynamics 365 Business Central: A flow field is part of the query column list, this is not supported (Flowfield based on Flowfield)

4. Dynamics 365 Business Central: The namespace ‘Microsoft’ is reserved and must be renamed (Uploading Extension error)


Hope this will help.

Thanks for reading.



Copied title and URL