Scripting in Business Central allows you to customize and automate interactions in the user interface, improving efficiency and facilitating user acceptance testing.
Scripting Tool in Business Central
In today's business environment, customization and efficiency are essential to maintain a competitive advantage. Microsoft Dynamics 365 Business Central offers a robust and flexible platform that allows companies to adapt their processes to their specific needs.

One of the most powerful tools to achieve this customization is scripting in web client pages.
This article explores how to use this tool to improve the user experience and optimize business processes.
What is Scripting in Business Central?
Definition and Features
The Business Central web client page scripting tool allows recording and playing back interactions with the user interface (UI) to automatically replicate the same actions.
This is useful for testing and validating business processes after changes or updates, facilitating user acceptance testing (UAT).
The tool captures both user interactions and actions resulting from AL code, but cannot automate elements outside the Business Central web client experience, such as control add-ins or embedded Power BI reports.
Benefits of Scripting in Business Customization
Scripting in Business Central allows companies to customize their processes efficiently, ensuring that UI interactions are consistent and repeatable.
This not only improves the user experience but also reduces the time and resources needed to perform tests and validations.
Prerequisites for Using Scripting in Business Central
Necessary Permissions
- To record, your user account must have the PAGESCRIPTING – REC permission set or equivalent permissions.
- To play back a recording, your user account must have the PAGESCRIPTING – PLAY permission set or equivalent permissions.
Initial Configuration
You can start the page scripting tool from the role center or from any page.
In the upper right corner, select the Settings icon > Page Scripts. The Page Scripts pane opens on the right side, as shown in the following figure:

How to Start with Scripting in Business Central
Access to the Scripting Tool
You are now ready to start a new recording or play back an existing recording.

During recording, you can manually insert special steps by right-clicking on a page control and selecting an appropriate option.
Use the page scripting tool for acceptance testing (preview) – Business Central | Microsoft Learn
Recording Interactions
The scripting tool allows recording all user interactions with the UI, ensuring that every action is captured accurately for later playback.
Playback of Recordings
Once recorded, interactions can be played back to validate business processes, ensuring that changes or updates do not negatively affect system functionality.
Best Practices for Scripting
Start from a Known Place
Start recording from a known place, such as the workspace. Playback always starts from the current page.
Filtering Values in Grids
When selecting a value in a grid, filter it so the desired value is first.
Creating New Entities for Testing
Creating new entities to use in a test has never been easier. For example, create a new customer to use in the new sales order test.
Avoid Data Dependencies
Avoid data dependencies that might not be available during playback.
Divide Recordings into Small Parts
Divide the recording into small parts to facilitate maintenance, for example:
- Recording 1: set up user.
- Recording 2: create customer.
- Recording 3: create customer order.
- Recording 4: post shipment.
Use Cases for Scripting in Business Central

-
User Acceptance Testing (UAT)
Scripting is especially useful for user acceptance testing, allowing validation that business processes work correctly after changes or updates.
-
Automation of Repetitive Tasks
Automating repetitive tasks through scripting can save time and reduce errors, improving operational efficiency.
-
Business Process Validation
Scripting enables consistent validation of business processes, ensuring all UI interactions are correct and efficient.
Summary of Benefits
Scripting in Business Central offers a powerful tool to customize and automate UI interactions, improving efficiency and facilitating user acceptance testing.
Next Steps to Implement Scripting
To start using scripting in Business Central, ensure you have the necessary permissions and follow the best practices described in this article.
Read also: Extract numbers in text in Business Central
Do You Need Help with Scripting in Business Central?

If you need assistance with scripting in Business Central, don't hesitate to contact us. Our team of programmers and Business Central and Navision expert consultants is here to help you optimize your business processes and improve the efficiency of your system.
Contact us and discover how we can help you take your business to the next level.
