Dynamics 365 Business Central 2024 Wave 1 – In-client Page Scripting Tool

With each update of Dynamics 365 Business Central, Microsoft enhances what is often referred to as the base application and the development environment. Dynamics 365 Business Central 2024 Wave 1 has several exciting Application features, one of which is the Use of an in-client page scripting tool for acceptance testing.

Business Central 2024 Wave 1 introduces a standout feature- the In-client Page Scripting Tool – my favorite feature to date. This versatile gem is not just for user acceptance testing but a potential game-changer in various scenarios, offering unique benefits that can significantly enhance your experience.

The in-client page scripting tool, designed with utmost user-friendliness, empowers customers and consultants to record and replay user acceptance tests effortlessly. This simplicity results in higher test coverage, reduces costs, and adds consistency when testing user scenarios. The Business Central web client lets you easily record your actions, such as opening pages or entering data. Once recorded, you can save and share the script for future playback.

To access the In-client page scripting tool, open the Settings menu and select the Page Scripting Action. This will open the Page Scripting dialog, where you can start a new recording or open a previously recorded script. It’s that easy!

Click the Recording action from the Scripting page menu to start a recording. Once the recording is started, perform the actions that you would like to script and watch as the page scripting tool “records” the sequence of steps.

After completing the desired action sequence, click the Stop action on the Scripting page menu.

The Page Scripting Tool now has a sequence of steps to “Play Back” and repeat. The script is executed by clicking the Play action on the menu.

When playing back a script for testing, the script will execute the sequence exactly as recorded, which may be sufficient in some cases. Still, there may be other scenarios where you would like to use different values, such as a quantity on a Sales Order line. A valid test would consist of repeatedly entering a different quantity value for each interaction. Fortunately, the page scripting tool supports functions, allowing you to control input values.

To enter a different quantity, select the Properties action from the context menu on the input step to open the Properties editor. You can enter a constant value or a set of formulas in the properties editor. The RandBetween function is one option for inputting a random number between two values. To script the input of a random number between 2 and 8, enter RandBetween(2,8) in the properties editor.

During recording, you can manually insert special steps by right-clicking a page control, like a field, and selecting an appropriate option.

You can insert validation steps to check the outcome when playing back the recording. This inserts a validation step with the current value. To change the value, go to the validate step in the Page Scripting step list.
Another option during the recording is to make some steps conditional.
To insert a branch of conditional steps, right-click a page control, select Add conditional steps when, and then select an option.
After the conditional step is inserted, you can add more steps to perform if the condition is met.
Select End scope in the Page Scripting steps list to end the condition branch.

The In-client Page Scripting Tool is my favorite feature introduced in Business Central with 2024 Wave 1. Based on what I see in this “first “release,” I can”only imagine how it will mature with each release.

Read more about the feature Use in-client page scripting tool for acceptance testing here.

Note: The code and information discussed in this article are for informational and demonstration purposes only. This content was created referencing Microsoft Dynamics 365 Business Central 2024 Wave 1 online.

Permanent link to this article: https://www.dvlprlife.com/2024/06/dynamics-365-business-central-2024-wave-1-in-client-page-scripting-tool/

Leave a Reply

Your email address will not be published.