Hi, Readers.
Today I would like to share another mini tip about Business Central, how to quickly get User Experience (Essential or Premium) in AL
Business Central is designed to help you run your business regardless of the size and complexity. At the core of the product, you find essential features, such as financial reporting, sales, purchasing, and inventory management. As business complexity increases, you can turn on functionality for manufacturing and service management, for example.
You can define the product complexity level, and thereby which features the company’s users get access to, by changing the Experience setting on the Company Information page.

The following table lists the experiences that are currently available.
| Experience | Impact on User Interface |
|---|---|
| Essentials | Shows all actions and fields for all common business functionality. |
| Premium | Shows all actions and fields for all business functionality, including Manufacturing and Service Management. |

We have discussed before that we can use ApplicationArea Property to make your custom features available only with the Premium license. More details: Dynamics 365 Business Central: How to make your custom features available only with the Premium license (ApplicationArea Property)
But is there an easy way to quickly get it in AL? Yes, of course, we have a standard method.
codeunit 9179 “Application Area Mgmt. Facade” -> procedure GetExperienceTierCurrentCompany(var ExperienceTier: Text): Boolean:

Here is a simple example,


Test code:
pageextension 50100 MyExtension extends "Customer List"
{
trigger OnOpenPage()
var
AppAreaMgmt: Codeunit "Application Area Mgmt. Facade";
ExperienceTier: Text;
begin
ExperienceTier := '';
AppAreaMgmt.GetExperienceTierCurrentCompany(ExperienceTier);
Message('Experience Tier: %1', ExperienceTier);
end;
}Test video:
Great, you can execute different codes based on the User Experience/Experience Tier set by your current company, give it a try!!!😁
END
Hope this will help.
Thanks for reading.
ZHU




コメント