Business Central 2026 release wave 2 (BC29): Share packaged resources between apps (publicResourceFolders)

Dynamics 365 Business Central

Hi, Readers.
The public preview for Dynamics 365 Business Central 2026 release wave 2 (BC29) is available. Learn more: Link.

I will continue to test and share some new features that I hope will be helpful. In this post, I would like to talk about Share packaged resources between apps.
Share packaged resources between apps:

Apps can now expose selected packaged resources to other apps. Add private resources to resourceFolders and shared resources to publicResourceFolders in app.json:

{
  "resourceFolders": [
    ".resources"
  ],
  "publicResourceFolders": [
    ".publicResources"
  ]
}
https://marketplace.visualstudio.com/items/ms-dynamics-smb.al/changelog

In Business Central 2024 Release Wave 2 (BC25.2), Microsoft added the ability to include resources in extensions and access them directly from AL. For example,
a.txt: Dynamics 365 Business Central: How to import data from CSV (comma-separated values) file

ItemPictures Folder:

Test video:

More details: Business Central 2024 wave 2 (BC25.2): Package resources (files) in extensions and access from AL

However, as of right now, resources can only be accessed within the scope of the app that contains them. This means there’s no way to access resources defined in another app. With this major update (BC29), Microsoft has addressed this limitation. Apps can now expose selected packaged resources to other apps.

Successful builds list every packaged public resource in both the ALC console and the Visual Studio Code output:

The existing NavApp overloads without an app ID continue to operate in the current app and can access both private and public resources:

If you use this method directly in another app that doesn’t contain any resources, you won’t be able to retrieve any files.

But the new app ID overloads cross the app boundary and can access only resources declared public by the provider:

Please note that you need to pass two parameters here. If you only pass one App ID, it will be treated as a filter.

For example,

Done.

Please note that this does not require adding a dependencies setting in the app.json file.

PS: Apps can also discover providers that expose a matching public resource and then enumerate each provider:

NavApp.ListResources() returns the current app’s combined private and public resources. NavApp.ListResources(AppId) is always public-only, even when AppId is the current app.

Attempts to retrieve a private resource through an app ID return the same not-found error as a resource that does not exist.

Great. Give it a try!!!😁

END

Hope this will help.

Thanks for reading.

ZHU

コメント

Copied title and URL