New Functionality In Microsoft Dynamics 365 Business Central 2024 Wave 1: Use In-client Page Scripting Tool for Acceptance Testing

Microsoft Dynamics 365 Business CentralThis post is part of the New Functionality In Microsoft Dynamics 365 Business Central 2024 Wave 1 series in which I am taking a look at the new functionality introduced in Microsoft Dynamics 365 Business Central 2024 Wave 1.

The 4th of the new functionality in the Development section is use in-client page scripting tool for acceptance testing.

With the page scripting tool, customers and consultants can easily record and replay user acceptance tests directly in the Business Central web client.

Enabled for: Users, automatically
Public Preview: Apr 2024
General Availability: Apr 2024

Feature Details

The page scripting tool in the Business Central web client allows you to record your actions, such as opening pages or entering data, and replay them. You can save the recording and share it with others for future playback. An important use case for the tool is capturing and executing user acceptance tests, which is also the initial focus for this release wave.

Open the tool

In the web client, the page scripting tool is accessed from the Settings menu (cog wheel icon). The Page Scripting action, however, only appears if you have record or playback permission to use the tool.

Choose Page Scripting in the Settings menu to open it

The Page Scripting pane opens on the right, where you’re asked whether to start a new recording or to open an existing one to inspect or replay it.

When opening Page Scripting, you can start a new recording or open an existing one to play back


To start recording your actions (in other words, start a user acceptance test), select Start new or select New > New recording in the toolbar at the top of the pane. Once recording starts, as indicated by a solid red circle in the toolbar, perform the actions you want to capture.

The page scripting tool will capture your on-screen interactions and the resulting actions, such as pages opening or closing, selections, data entry, and so on.

During recording, it’s possible to delete the last captured step.

To stop the recording, use the Stop button in the toolbar. To resume to record more steps, select the round Start recording button in the toolbar.

The following figure illustrates some captured steps and toolbar (while recording).

Example of recording steps

Options for capturing steps

During recording, you can manually insert special steps by right-clicking a page control, like a field, and selecting an appropriate option. These options are explained in the following sections.

Copy to and paste from clipboard

The page scripting tool comes with its own clipboard that lets you copy field values and then, for example, insert them in other fields, use them in expressions, or use them to validate results. To copy and paste during recording, right-click a page control and select Copy or Paste from the context menu.

Example of pasting value copied to clipboard

Paste session info

When recording, you have access to session information, such as the user ID. This allows you to, for example, set filters based on the current user. To insert the user ID, right-click a control in the page and select Paste > Session Info > User ID. For an example, see the previous image.

Validate a given outcome

During the recording, you can insert validation steps to check the outcome when playing back the recording. To do this, right-click a control, such as a field or cue, and select Validate in the context menu. This inserts a validation step with the current value. If you want to change the value that’s validated, you can go to the validate step in the Page Scripting step list, select the context menu , and select Properties.

Insert a validation step during recording

Make some steps conditional

Another option during the recording is to insert a conditional branch step. For example, suppose you only want some steps done during playback if there are no current rows in a list.

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 has been inserted, you can add more steps that should be performed if the condition is met.

To end the condition branch, select End scope in the Page Scripting steps list.

The actual condition can be changed by selecting the condition step in the Page Scripting step list, expand the properties, and set the comparison rule and value.

Modify comparison rule and value for compare step

Edit captured steps

During recording, as well as playback, you can edit a captured step in the Page Scripting pane using the context menu on the step. The options in the context menu depend on whether you’re in the record or playback mode and the kind of step. Some of the options are explained in the following sections.


Some steps have properties, which include things like conditional steps or validation steps. You can see the properties for a step by selecting the Properties option from the context menu on a step.

Example of step value set with a Power Fx expression

Using expressions in properties

Values and conditions can use expressions for simple calculations. Power Fx is used as the expression language. There’s a link to the Power Fx expression reference documentation in the UI.

Besides the Power Fx functions, three top-level objects are available:

  • Clipboard for access to the current entries copied in the recording.
  • Parameters for access to the value of any parameters passed to this recording.
  • SessionInfo for session information like current user ID.

Here are a couple of examples:

  • To validate that a previously copied value is incremented in a validate step, use the expression "Clipboard.'SO Processor Activities - ReadyToShip' + 1"
  • To generate a "random" name to use in an input step, use the expression "Customer " & Today().

Handle optional pages

Sometimes a page doesn’t always show in a recorded flow because it depends on data or settings. An example is the confirm dialog shown when closing a sales order. To handle this, you can make the page an optional page, which means that the steps under the page will only be run if the page is shown. To make a page optional, go to the Page Scripting step list, select the recorded step named Page X was shown, select the context menu , and select Make this an optional page.

How to make a page optional

The steps that occur on the page are indented to indicate that they’re optional, depending on page being shown.

Once a page is optional, the steps for that page will show nested under the page


To play a recording, whether you just captured it or you opened it from a file, select the Play button in the toolbar.

During playback, you can do the following actions:

  • Go forward or backward a single step by using Forward and Backward buttons in the toolbar. When stepping backward, changes aren’t undone, though. You have to undo changes manually.
  • Go back to the beginning of the recording.
  • Run the recording as far as a given step. To do this, select the context menu and then select Run to here.

As the steps are played back, the tool records whether they completed successfully (green check mark) or failed (red exclamation mark) and provides the result of any steps that validate a result.

Result of playing back a recording. Includes result of each step

Save a recording

You can save the recording from the toolbar. This creates a YAML file that you can download, share, edit, and reopen for playback.

Share a recording

You can share a recording as a link by selecting Share in the toolbar. The link includes the full recording and its playback result. In the following example, the playback has failed halfway through the recording.

Share a recording along with the replay result

Supported capture actions

The page scripting tool is focused on capturing actions coming from executing AL code. The tool isn’t a generic HTML automation tool. Therefore, it can’t automate elements such as control add-ins (like charts), embedded Power BI or Power Apps, or anything outside of the Business Central web client experience.

My Opinion

This sounds like an interesting addition which could be useful in a few scenarios. I’ll need to get hands on with it to fully judge how useful.

Click to show/hide the New Functionality In Microsoft Dynamics 365 Business Central 2024 Wave 1 Series Index

New Functionality In Microsoft Dynamics 365 Business Central 2024 Wave 1
Use Virtual Tables to Expose More Business Central Data in Dataverse
Improve Approval Processes via Power Automate
Add Table and Field Mappings for Existing Integration Tables
Find a Matching Record in a Power Automate Flow
Archive Projects
Usability Improves for Service and Projects
Use Deferral Codes in Purchase and Sales Journals
Define a Service Invoice Posting Policy for Various Users
Define Default Location for Project or Project Phase
Block Item, Item Variant or Service Item from Use in Service Management transactions
Connect Business Central With Shopify B2B
Set Up Financial Consolidation Runs More Efficiently
Simpler Shopify Connection
Use General Ledger Account Revaluation for More Accurate Financial Statements
Get More Productive While Entering Time Sheets
Create Projects That You Can Invoice to Multiple Customers
Assemble to Project
Invoice a Customer for Multiple Projects
Use New Excel Layouts for 35 Selected Reports
Use Standard Terminology for Project Management
Use Currencies When Posting Employee Transactions
Manage Work Orders in Field Service, Invoice Them in Business Central
Manage Document Attachments in Service Items and Documents
Export and Import Multiline Text Using Configuration Packages
Correct Errors in Service Invoices
Prevent Editing Number Series on Service Documents and Cards
Be More Productive When Approving Time Sheets
Inventory Package Numbers Work Like Item Tracking Dimensions
Assign Salesperson to Customer Ship-to Addresses
View Incoming Documents in Archived Quotes and Orders
Specify Dimensions on Posted Entries Applications With Realized Gains or Losses
Allow Lines with Amounts of Zero on Recurring General Journals
Automate the Reminders Process in Collections
See Improved Usability for Warehouse and Inventory
Ensure Accurate Inventory Valuation by Controlling Cost Adjustment
Use a New Role Center for Collection Management
Introduce Power Automate Copilot Integration with Business Central
Map e-Documents to Purchase Order Lines with Copilot
Create Sales Lines Easily with Copilot
Extend Copilot Using Richer Development Tools
Get to Insights Faster with Copilot-Generated Analysis Tabs
Complete Bank Account Reconciliation Faster With Copilot
Create Product Information Faster with Copilot
Learn More About Fields with Copilot
Chat with Copilot
Automate IRS 1099 Form Submission in US
Enable Additional Countries and Regions
Install UK Localization as an App
Process Czech Bank Statements, Payment Orders More Productively
Improvement of Czech Localization Reports
Report Explorer has Additional Outputs in the Czech Version
Improved Updates of ARES Data in the Czech Version
Allow More Extendability of Advance Payments in the Czech Version
Print QR Codes on Sales Invoices in the Czech Version
Use Excel Layouts for Czech Reports
Handle Multiple File Uploads and File Drop Zones
Debug the System Application
Remove Friction When Working with External App Dependencies
Use In-client Page Scripting Tool for Acceptance Testing
Use AL-controlled Barcode Scanning For All Scenarios
Write flexible and performant code with NumberSequences
Use the OData V4 IN Operator in Web Service Queries
Define Extension Objects in Same App as Their Base Object
Use Cookies in HTTP Calls From Business Central
Define Tooltips on Table Fields
Use Linked Environment in Dataverse Integration
Audit Business Central Operations in Microsoft Purview
Encrypt Data At-Rest with Customer-Managed Encryption Key
Allow Customers to Consent to Microsoft Support Accessing Their Data
Link Business Central Environments to Power Platform Environments
Copy Companies with Dataverse Integration Safely
View and Filter Users With Additional User Details
Control partner access per environment
Analyze Telemetry Events Across Browser and Server for a Session or User
Use Premium License to Sign In to Environment with Essentials Licenses
Experience the New Embedded AppSource Marketplace Page
See VAT Date in Posting Previews
Automate Country of Origin Listed for Item Tracking Code in Intrastat Reporting
Achieve Sustainable Compliance with Business Central
Discover Report and Data Analysis Content Easily
Use Drag and Drop to Attach Multiple Files
Use Actions to Navigate and Highlight or Fix Platform-Generated Errors
Share Error Details to Get Help from Another User
Access Worksheet Pages from Mobile Phones
Boost Productivity With the Modern Action Bar
Enhancements to the User Experience

What should we write about next?

If there is a topic which fits the typical ones of this site, which you would like to see me write about, please use the form, below, to submit your idea.

Your Name

Your Email

Suggested Topic

Suggestion Details

Leave a Reply

Your email address will not be published. Required fields are marked *