Page scripting lets key users record a Business Central process in the web client, add validation steps and replay it as a YAML script — no AL code required. In BC 29 (2026 release wave 2) the tool left preview and gained multi-row selection and dialog-text validation, making it a practical regression pack to replay on a sandbox before each update.
The one-sentence answer
Page scripting is the recorder built into the Business Central web client (Settings → Page Scripting) that turns a user’s clicks, entries and checks into a replayable YAML script, so key users can rerun their own acceptance tests on an updated sandbox before each major update. Microsoft’s 29.0 release notes list it as generally available (even though the menu in our 29.1 test environment still says “Preview”), with multi-row selection and dialog-text validation.
Puntos clave
- Page scripting records user actions in the Business Central web client (Settings → Page Scripting) and replays them, marking each step as passed or failed.
- Recording requires the PAGESCRIPTING - REC permission set and playback requires PAGESCRIPTING - PLAY; the person replaying also needs normal permissions for the pages and postings involved.
- In BC 29 (2026 release wave 2) page scripting became generally available and added recording of multiple-row selection in grids plus validation of message and error dialog text.
- Scripts are saved as YAML files that can be shared, edited, combined with include steps and parameters, and run unattended with Microsoft's @microsoft/bc-replay npm package or AL-Go for GitHub.
- Page scripting cannot automate control add-ins, embedded Power BI or anything outside the web client, and playback changes real data, so regression rounds belong in a sandbox.
What page scripting is—and what it is not
Microsoft describes the tool as a way to record interactions with the user interface—opening pages, choosing actions, filling in fields—and replay them so the exact same actions are repeated, with real-time feedback on whether each step succeeds or fails. Its stated primary use is user acceptance testing (UAT): proving that business processes still work after changes or updates.
It works on every environment type: online production and sandbox, on-premises and Docker. It records both what the user does and what the application does in response, because it follows the AL code behind the page. That is also its boundary: it is not a generic browser robot. Control add-ins such as charts, embedded Power BI reports and anything outside the Business Central web client cannot be automated.
For a finance team the important point is who writes the test. AL test codeunits are written by developers; a page script is recorded by the accountant who knows that a reverse-charge invoice must produce a particular VAT result. No AL code is involved.
Who can use it: two permission sets
- PAGESCRIPTING - REC is required to record.
- PAGESCRIPTING - PLAY is required to play back a recording.
The Page Scripting entry in the Settings menu only appears for users with record or playback permission. A script drives the client in the session of whoever replays it, so that person also needs ordinary permissions for every page and posting the script touches. In practice we assign REC to the few key users who own each process and PLAY to whoever runs the regression round.
Record, validate, replay
Open the page where the test should begin—Microsoft recommends a well-known location such as the role centre, because playback always starts from the current page. Then select the Settings cog → Page Scripting. The pane opens on the right; choose Start new.

The record button turns red and every action is added as a step. While recording you can pause, delete a step, drag steps into a new order, or use … → Record from here to insert steps in the middle. Right-clicking a control and choosing Page Scripting offers the options that turn a recording into a test:
- Validate → Current value inserts a check. Under … → Properties you can change the operator and value, or write a Power Fx expression.
- Copy and Paste use the tool’s own clipboard, so a value captured early (an invoice number, a balance) can be reused or compared later.
- Add conditional steps when and For each create branches and loops; End scope closes them.
- Make this an optional page on a “Page X was shown” step stops a confirmation dialog that does not always appear from breaking playback.
- Parameters let a reviewer choose, for example, the posting date at playback time; if a parameter is not set, a dialog asks for it.


Stop the recording, select Play, and each step is marked with a green check mark or a red exclamation mark. Previous, Next, Rewind and … → Run to here help locate a failure. Finally, select Save to download the script as a YAML file.

What changed in BC 29 (2026 release wave 2)
The update 29.0 feature list includes Page Scripting enters General Availability (roadmap ID 573384). Microsoft’s roadmap entry states that the tool moves out of preview, is fully localised, includes accessibility, usability and visual improvements, and adds two capabilities:
- Multiple-row selection in grids. The recording captures adding or removing a row, extending the selection to a range, selecting all and clearing the selection, and recreates that selection during playback before the next action runs. A new Validate → Selected row count check is available only once the whole list is loaded, so a partially loaded list cannot produce a wrong count.
- Validation of message and error dialog text. Right-click the text in the dialog and choose Validate → Current value. A test can now prove that Business Central refuses something—not only that it accepts it.
General availability matters for governance too: a preview feature is hard to write into a formal test procedure. One caveat from the field: in our version 29.1 environment the Settings menu still reads Page scripting (Preview) and the pane carries a Preview badge, so check what your own environment shows before you cite “GA” in a test procedure. The tool has been built up across four release waves:
BC 24
2024 release wave 1
Page Scripting pane ships as a preview: record, validate, conditional steps, optional pages, save to YAML, share as a link.
BC 25
2024 release wave 2
Standalone bc-replay player published on npm, so saved scripts can run in CI/CD pipelines.
BC 27
2025 release wave 2
Easier editing: move the insert line, drag steps, delete any step, define parameters and include other scripts from the pane.
BC 29
2026 release wave 2
General availability, fully localised, plus multi-row selection in grids and validation of message and error dialog text.
Sharing scripts and running them outside the client
A saved script is a plain YAML file: it can be emailed, kept in SharePoint or a Git repository, edited by hand, and reopened with Open in the pane. Share → Copy Link produces a URL containing the full recording and its playback result—useful for sending a failed run to your partner. A host script can include other scripts (… → Add step → Include a script), which lets you split “create customer”, “create invoice” and “post invoice” into reusable parts. Included steps cannot be edited from the host script.
For unattended runs, Microsoft publishes the @microsoft/bc-replay npm package (Node.js 16.14.0 or later, PowerShell 7 or later). After npm i @microsoft/bc-replay --save, a folder of scripts runs with:
npx replay .\recordings\*.yml -StartAddress <web client URL> -Authentication AAD -UserNameKey BC_USER -PasswordKey BC_PASS -ResultDir c:\bc-replay\resultsThe credentials are read from the environment variables named by -UserNameKey and -PasswordKey, and the test account cannot use multifactor authentication—so use a dedicated, tightly permissioned test user on a sandbox only. Results open with npx playwright show-report. Teams on AL-Go for GitHub can list script files in the pageScriptingTests project setting to run them in the CI/CD workflow.
Limitations to plan around
- Scripts depend on data. Microsoft advises creating new records inside the test rather than relying on records that may not exist at playback, and filtering lists so the wanted row appears first.
- Playback changes real data, and stepping backwards does not undo anything. Run regression rounds in a sandbox, never in production.
- Wait steps can only be added after the last step, not between earlier steps.
- Charts, embedded Power BI and other control add-ins are out of scope; validate the underlying figures on a normal page instead.
- Keep scripts short and modular. One long script that fails at step 4 tells you nothing about steps 5 to 80.
10 scripts every finance team should record before an upgrade
Adapt the list to your own posting setup, but keep the principle: every script ends with at least one validation step, otherwise it only proves that pages open.
| # | Script | What it does | Validation step |
|---|---|---|---|
| 1 | Customer invoice end to end | Create a test customer, create and post a sales invoice, open the posted invoice. | Validate the total including VAT on the posted invoice. |
| 2 | Corrective credit memo | From a posted sales invoice, run Create Corrective Credit Memo and post it. | Copy the customer’s Balance (LCY) first; validate that it returns to that value. |
| 3 | Purchase invoice with VAT and dimensions | Post a domestic purchase invoice with a G/L line and your mandatory dimensions. | Validate the amount including VAT and the dimension values on the posted document. |
| 4 | Intra-EU reverse-charge purchase | Post a purchase invoice for an EU vendor using your reverse-charge VAT posting setup. | Validate the VAT amount your setup is expected to produce on the document. |
| 5 | Accrual in a general journal | Copy a G/L account’s Balance, post an accrual journal line, reopen the account. | Validate Balance with a Power Fx expression: clipboard value plus the posted amount. |
| 6 | Customer payment application | In a cash receipt journal, apply a payment to the invoice from script 1 and post. | Validate that Remaining Amount is 0 on the customer ledger entry. |
| 7 | Batch posting several purchase invoices | Select several open invoices on the Purchase Invoices list and choose Post. | Validate the selected row count before posting (new in BC 29), then the result. |
| 8 | Approval request | Send a purchase invoice above your approval threshold for approval. | Validate that Status is Pending Approval. |
| 9 | Closed-period protection | Try to post a journal line dated outside the allowed posting dates. | Validate that the error dialog contains “is not within your range of allowed posting dates” (new in BC 29). |
| 10 | VAT statement preview | Open your VAT statement and choose Preview for a fixed, closed period. | Validate one or two box totals against the figures you filed for that period. |
A routine that fits the update window
Online, administrators can schedule update 29.0 on any date within a five-month update period that ends in February 2027. That window is exactly what page scripts are for:
1 →
Record and save scripts on the current version
2 →
Copy production to a sandbox and update the sandbox first
3 →
Replay every script with PAGESCRIPTING - PLAY
4 →
Share failed runs as links, then fix or escalate
5
Schedule the production update
Developer-level testing is a separate layer: our article on running AL tests from VS Code in BC 2026 covers the code side. Page scripts cover what the finance team sees. If you want help building and maintaining a script library for each update cycle, that is part of our Business Central support service.
When page scripting has paid for itself
An update is accepted when the people who own the processes have replayed their own scripts on the new version and every validation is green—not when the release notes have been read.
Want a regression pack before your next update?
We help finance teams choose the processes that matter, record and parameterise the scripts, and replay them on an updated sandbox before production moves.