Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
| Enabled for | Public preview | General availability |
|---|---|---|
| Admins, makers, marketers, or analysts, automatically |
Feb 3, 2025 |
Feb 3, 2025 |
Business value
Features often need data to initialize and set up. Previously, you added and consumed this data from AL by using labels or code. In this release, you can include resources in extensions and access these resources from AL.
Feature details
Developers can package resources in extensions and access these resources from AL code. Use this feature to send data for setup and initialization features, such as RapidStart packages, demo data, and templates. You don't need to use labels or codeunits for this purpose.
To package resources in an extension, declare the folders in your project that contain resources in the extension's manifest file (app.json). Add the resourceFolders property to the manifest file. You can specify multiple folders. Resource folders can contain subfolders.
AL code can access resources at runtime. Use several methods to interact with resources:
NavApp.GetResource(ResourceName: Text; var ResourceStream: Instream; (Optional) Encoding: TextEncoding))reads the content of resource files at runtime.- Use
NavApp.GetResourceAsText(ResourceName: Text; optional Encoding: TextEncoding): Text to read the content of resource files directly into a Text object. - Use
NavApp.GetResourceAsJson(ResourceName: Text; optional Encoding: TextEncoding): JsonObject to read the content of resource files directly into a JsonObject.
An extension can access only its own resources.
The following size limits apply to resources:
- Any single resource file can be up to 16 MB.
- All resource files together can be up to 256 MB.
- An extension can have up to 256 resource files.
Geographic areas
Visit the Explore Feature Geography report for Microsoft Azure areas where this feature is planned or available.
Language availability
Visit the Explore Feature Language report for information on this feature's availability.
Tell us what you think
Help us improve Dynamics 365 Business Central by discussing ideas, providing suggestions, and giving feedback. Use the forum at https://aka.ms/bcideas.
Additional resources
Add and access resources in Business Central extensions (docs)
Feb 3, 2025