Today, let us talk about the wizard and Assisted Setup. Wizard is a step by step guidance through a setup process, and Assisted Setup is a list of setup scenarios to help Business Central User setting up a module. So In order to facilitate user settings, you should consider creating one or more Assisted Setups for your extension when creating an extension for Business Central.
Next, let’s try to create a new wizard page and add it to Assisted Setup page.
1. Create new page of type NavigatePage for General Ledger Setup.
Set PageType property to “NavigatePage“
Set SourceTable property to “General Ledger Setup“
2. Add a Group for each Step (For example: four step)
3. Create global type Boolean variables, on each group, set the Visible property.
PS: You can also create global Integer variable and set the Visible property with an expression
4. Create a sub group inside the steps and add the caption and fields
5. Add three actions to facilitate navigation.
Names: ActionBack , ActionNext , ActionFinish
Captions: Back, Next, Finish
Set the InFooterBar property to true
Create three global variables of type Boolean: BackActionEnabled, NextActionEnabled, FinishActionEnabled
On each action, set the Enabled property to the appropriate global variable
On each action, set the Image property
6. Add Code for Navigation (This is not the only method, for reference only.)
Create global variables.
Create a function EnableControls
Set starting values in the OnOpenPage trigger
Add OnAction triggers to the navigation actions.
7. Add Image Header (Reference standard code)
Create two global record variables for the Media Repository table and for the Media Resources table
Create two new groups above the “Step 1” Group.
Create a new function to load the top banner images
Call this function from the OnInit trigger
The development of Wizard is over.
Next, add it to Assisted Setup Page.
First step of Wizard page should contain Welcome message, or explanation of the wizard.
Only the Finish step should write data into actual tables.
Assisted Setup is a system codeunit which allows you to register your wizard page and execute your wizard page when the User opens it from Assisted Setup.
codeunit 3725 “Assisted Setup”
Function to add wizard page:
VideoLink and HelpLink is not required.
AssistedSetupImpl.Add(ExtensionID, PageID, AssistantName, GroupName, VideoLink, “Video Category”::Uncategorized, HelpLink, ”);
if you have translation for the name of the setup.
AssistedSetupImpl.AddSetupAssistantTranslation(PageID, LanguageID, TranslatedName);
So subscribe Assisted Setup events to register “General Ledger Setup Wizard” page.
VideoLink: ‘https://www.youtube.com/embed/hRLjl2u4I0w’ (embed link only)
Variables and GetAppID function.
Development is all complete.
Maybe you will create new setup page when creating your extension. But Wizard and Assisted Setup are the best way to ask users to configure setup for your extension. You don’t even need to train users, just let them refer to the content in Assisted Setup.
You can download source code from GitHub.
If you have read the following blog and installed the extension packs, you can use Snippet to create a Wizard page in an instant.
Dynamics 365 Business Central: Two Extension Packs that will make you more productive
Hope this will help.