The preview environment for Dynamics 365 Business Central 2021 release wave 2 (BC19) is available now. Learn more: https://yzhums.com/17638/
Update: Generally available: Dynamics 365 Business Central 2021 release wave 2 (BC19)
I will continue to test and share some new features that I hope will be helpful.
Richer access control for extension source in cloud environments:
Currently it’s possible to control access to an extension source in the cloud through the app.json property ShowMyCode. If enabling this, an extension source will be available both for debug, download (PTEs), and in symbols. Because of this, many partners select not to share the source, thereby also prohibiting debug, leading to longer times to mitigate customer issues, and challenges with providing alternatives for debugging a source.
For better control of source access, more granular options will be provided. At this time, implementation details are still being worked on. This could be solved by replacing the existing ShowMyCode property in the app.json file and enhancing it with more detailed options—for example, AllowDebugSource, AllowDownloadSource, or AllowSymbolsSource.
When you create a new extension for BC19 (“runtime”: “8.0”), you will immediately find a warning about “showMyCode”.
‘showMyCode‘ is being deprecated in the versions: ‘8.0’ or greater. This property is being deprecated in favor of ‘resourceExposurePolicy‘. This warning will become an error in a future release.
Yes, this is new feature for Business Central 2021 wave 2 (BC19), you can use “resourceExposurePolicy” setting for better control of source access now.
Let’s see some details.
“resourceExposurePolicy”: Defines the accessibility of the resources and source code during different operations. (Used to replace the ‘showMyCode‘ setting)
“includeSourceInSymbolFile”: Includes the source code in the symbol package. The default setting is false. (When the user extracts the Symbol file, whether the source code can be seen)
“allowDownloadingSource”: Allows the source code to be downloaded. The default setting is false. (Whether users can download the source code on the Extension Management page)
“allowDebugging”: Allows the code to be debugged from other extensions when it has been published. The default setting is false. (When debugging whether the user can see the source code)
Note: You can not add both ‘ShowMyCode’ and ‘ResourceExposurePolicy’ properties.
error AL1075: Both ‘ShowMyCode’ and ‘ResourceExposurePolicy’ properties are added. You should use the ‘ResourceExposurePolicy’ property and remove the ‘ShowMyCode’ property.
MS Docs has been updated (2021/10/12): Resource Exposure Policy Setting
Update 2021/11/10: Info from Microsoft
Hope this will help.
Thanks for reading.