Dynamics 365 Business Central: Finish up Design in a specific extension (Adding Design contents to a specific extension, not creating a new extension)

Dynamics 365 Business Central

Hi, Readers.
Today I would like to talk about a very interesting thing, how to finish up Design in a specific extension.

Designer in Dynamics 365 Business Central complements the development experience in Visual Studio Code. It provides an easy and convenient way to make immediate changes to your design by dragging and dropping the components on the page.

And Designer in Business Central has the following three important points:

Important
Currently, Designer is only available from a Dynamics 365 Business Central sandbox.

Every time you start designing, youā€™re effectively creating a new extension. Your changes are immediately visible to other users in the sandbox environment.

Designer cannot be used by multiple users at the same time in sandboxes.

https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-inclient-designer

In this post, we will mainly look at the second one.

What does this mean? Anyone who has tried this feature will be aware of the problem. Letā€™s see an example.
Test Video: Running Design twice will save as two different extensions, even for the the same page (Customer List).


I think thatā€™s the biggest downside of Design feature, because developers also have to integrate these scattered extensions in VS Code. Of course, you can consider all the factors as much as possible in one design, donā€™t miss any, itā€™s almost impossible.

So is there a way to avoid this problem?
Yes, I found the answer in another MS Docs.

Web Client URL Parameters:

ParameterDescription
extensionSpecifies the unique identifier (ID) of an extension that is deployed on the environment. This parameter is typically used during the development of the specified extension in a non-production environment. When this parameter is set, only the specified extension is available in the client, and the client opens in Designer. All other extensions are ignored and not visible. This parameter enables you to isolate and focus on the behavior of the specified extension only.

An extension ID is a 32-digit GUID, such asĀ 72CC5E27-BD97-4271-AF55-F77E4471E493. You set this parameter using the formatĀ extension={GUID}, for example:

&extension={72CC5E27-BD97-4271-AF55-F77E4471E493}

You can determine an extension ID by opening the extension in Visual Studio Code and looking in the app.json file. Or, you can run theĀ Get-NAVAppManifest cmdletĀ on the extension package.

For example:

https://businesscentral.dynamics.com/d8f36038-1f93-4543-affc-5dc92b6ee871/Sandbox203?&extension={d2983e91-7557-4f51-83f5-a4e984e5d138}

PS: You can find App ID in Extension management page or app.json file.

Letā€™s try again.

When we add the extension parameter to the url, the client opens in Designer mode.

When we finish up Design, the Extension Name and Publisher cannot be changed.

After saving, the contents of Design will be integrated into the same Extension.

Test Video:

Isnā€™t it amazing? give it a try!!!šŸ˜

PS:
1. Unlike the first Design, if you go beyond the scope of the first Design Extension, for example, if you modify only the Base Application for the first time and want to modify the System Application for the second time, the following error occurs.

Cannot build the page 9006. The page 8885 is defined in the extension ā€˜System Applicationā€™ published by ā€˜Microsoftā€™ which is not listed among the dependencies of the current designer extension ā€˜Designer Testā€™.

2. If you want to make changes to your PTE, you need to set AllowDownloadingSource in the ResourceExposurePolicy property to true.

The extension ā€˜Designer PTEā€™ published by ā€˜YUN ZHUā€™ cannot be designed because its manifest property AllowDownloadingSource in the ResourceExposurePolicy property is set to false.

More details: Richer access control for extension source in cloud environments (ā€˜showMyCodeā€™ -> ā€˜resourceExposurePolicyā€™)

3. When I was testing, one of the environments had the following issue, Iā€™m not sure if this is a bug or not. After a while, the problem disappears automaticallyā€¦ā€¦

A server error has occurred, and the content cannot be displayed. Refresh the page or open a new browser window.

More details about Design feature:
How to deploy your Design Extension (.zip file) to production environment
Controlling user access to Designer

END

Hope this will help.

Thanks for reading.

ZHU

ć‚³ćƒ”ćƒ³ćƒˆ

Copied title and URL