Business Central 29 introduces four new properties on the ModuleInfo type, allowing AL developers to retrieve additional application manifest metadata programmatically.
The new properties are Help, EULA, PrivacyStatement, and ContextSensitiveHelpUrl, and they require runtime version 18.0 or later.
What are the new ModuleInfo properties?
The ModuleInfo type provides information about a Business Central application or module. With Business Central 29, developers can now access more of the metadata associated with an application directly from AL code.
The four new properties are:
Help— Returns the Help link of the specified application.EULA— Returns the End User License Agreement (EULA) link of the specified application.PrivacyStatement— Returns the privacy statement link of the specified application.ContextSensitiveHelpUrl— Returns the context-sensitive Help URL with the user's locale resolved from the application's supported locales.
These properties can be useful when an extension needs to expose application documentation, licensing information, or privacy information to users without duplicating the configured URLs in AL code.
How do you retrieve ModuleInfo in AL?
The first step is to create a variable of the ModuleInfo type and populate it with information about the current module.
For example:
procedure ShowAppMetadata()
var
appInfo: ModuleInfo;
begin
NavApp.GetCurrentModuleInfo(appInfo);
Message('Help: %1\EULA: %2', appInfo.Help, appInfo.EULA);
end;NavApp.GetCurrentModuleInfo(appInfo) retrieves the information for the current application and stores it in the ModuleInfo variable.
Once the variable has been populated, the new properties can be accessed directly.
For example:
appInfo.Help
appInfo.EULA
appInfo.PrivacyStatement
appInfo.ContextSensitiveHelpUrlWhat does the Help property return?
The Help property returns the Help link configured for the application.
This makes it possible for AL code to access the application's Help information and potentially present that information to users through a page, action, notification, or other extension functionality.
Instead of maintaining a separate hard-coded copy of the Help URL, an extension can retrieve the value from its application metadata.
What does the EULA property return?
The EULA property provides access to the application's End User License Agreement link.
For extensions that need to make licensing information easily accessible, this can be useful for creating a user experience where the EULA is surfaced directly from Business Central.
The value comes from the application's metadata, so the AL implementation can consume the configured application information.
What does PrivacyStatement return?
The PrivacyStatement property returns the application's privacy statement link.
Similar to the Help and EULA properties, this provides AL code with direct access to the application's configured privacy information.
An extension could use this value when building a setup page, information page, or other user-facing experience where privacy information needs to be accessible.
How does ContextSensitiveHelpUrl work?
ContextSensitiveHelpUrl is particularly interesting for applications that provide localized documentation.
The property returns the context-sensitive Help URL with the user's locale resolved from the application's supported locales.
This means developers can retrieve a Help URL that takes localization into account rather than simply treating the URL as a static string.
For extensions with multilingual documentation, this can make it easier to direct users to the appropriate localized Help content.
Why are these properties useful for Business Central extensions?
Application metadata is often configured once as part of the extension's manifest, but different parts of an extension may need to consume that information.
The new ModuleInfo properties provide a programmatic way to retrieve that metadata.
Potential scenarios include:
Providing Help links directly from an extension's UI.
Exposing EULA information from setup or informational pages.
Providing access to privacy statements where users need them.
Opening localized context-sensitive documentation based on the user's locale.
Avoiding unnecessary duplication of application metadata in AL code.
The exact implementation depends on the requirements of the extension, but the underlying capability is now available directly through ModuleInfo.
What runtime version is required?
The new properties require runtime version 18.0 or later.
This is important when updating an existing extension or when deciding which runtime version to target.
If an extension must continue supporting an older runtime, developers should consider this compatibility requirement before using these properties.
A simple example
A basic implementation can retrieve the current module information and display selected metadata:
procedure ShowAppMetadata()
var
appInfo: ModuleInfo;
begin
NavApp.GetCurrentModuleInfo(appInfo);
Message(
'Help: %1\EULA: %2\Privacy: %3',
appInfo.Help,
appInfo.EULA,
appInfo.PrivacyStatement);
end;The same appInfo variable can also be used to retrieve ContextSensitiveHelpUrl.
The important pattern is straightforward: retrieve the current module information with NavApp.GetCurrentModuleInfo() and then access the required metadata through the ModuleInfo properties.
Frequently Asked Questions
What is new in ModuleInfo in Business Central 29?
Business Central 29 adds Help, EULA, PrivacyStatement, and ContextSensitiveHelpUrl properties to ModuleInfo.
Which runtime supports the new ModuleInfo properties?
The new properties require runtime version 18.0 or later.
How do I get the current application's ModuleInfo?
Use NavApp.GetCurrentModuleInfo(appInfo) to populate a ModuleInfo variable with information about the current application.
What is ContextSensitiveHelpUrl?
ContextSensitiveHelpUrl returns the context-sensitive Help URL with the user's locale resolved from the application's supported locales.
Can I access the EULA and privacy statement from AL?
Yes. Business Central 29 exposes EULA and PrivacyStatement through ModuleInfo, allowing AL code to retrieve those application metadata values.
Conclusion
The new ModuleInfo properties in Business Central 29 provide AL developers with programmatic access to important application manifest metadata.
With Help, EULA, PrivacyStatement, and ContextSensitiveHelpUrl, extensions can consume their configured documentation and policy links directly through ModuleInfo. The localized behavior of ContextSensitiveHelpUrl is especially useful for extensions that support multiple locales.
For developers working with Business Central 29 and runtime 18.0 or later, these additions provide a simple and consistent way to work with application metadata from AL.
Subscribe to the Saurav Dhyani YouTube channel for Business Central technical tutorials, AL development, APIs, extensions, new features, and practical implementation guidance.
You can also connect with me on:
Regards,

Comments
Post a Comment