Blog |

Mastering the Basics of the Page Scripting Tool in Microsoft Dynamics Business Central

Thursday, January 23, 2025
Reading time: 4 minutes

In the world of Microsoft Dynamics Business Central, automation and efficiency are paramount. The Page Scripting Tool is designed to aid users in capturing and executing scripts that simulate user actions, thus streamlining processes and enhancing user acceptance testing. This blog post will guide you through the basics of using the Page Scripting Tool, leveraging the insights shared in our previous advanced blogs on parameterizing and combining scripts.

What is the Page Scripting Tool?

The Page Scripting Tool in Business Central is a powerful utility that allows users to record and playback scripts, simulating various user interactions with the system. This tool is instrumental in user acceptance testing, ensuring that processes are validated before going live, and reducing the reliance on manual test documents. With the advent of version 25, these scripts can even be integrated into CI-CD pipelines, although the tool is currently in preview.

Getting Started

To start using the Page Scripting Tool, you need to meet certain prerequisites:

This tool is available in both BC SAAS and BC OnPrem environments. Recording scripts does not modify data, while playing back scripts modifies data and may trigger a warning if performed in production. 

Recording a Script

Recording a script captures the actions a user performs within Business Central, creating a YAML file that can be played back to automate these actions.

This script can be edited later to refine the recorded actions or add parameters (see my previous BLOG post about this).

Playing Back a Script

Playing back a recorded script executes the actions captured in the YAML file, simulating user interactions.

Playback can be performed in both sandbox and production environments, though caution is advised in production due to data modifications. If you playback in production environments a warning will be displayed.

Best Practices

To maximize the efficiency and reliability of your scripts, consider the following best practices:

Combining smaller scripts into suites allows for modular and maintainable automation, as detailed in our advanced blog posts.

Known Issues and Limitations

While the Page Scripting Tool is a powerful asset, it is currently in preview and has some limitations:
Additionally, designer interactions and multiple notifications may not be accurately captured or played back.

New Feature in Version 25

With the release of version 25 of Business Central, you can now playback scripts in AL-GO pipelines. This new functionality allows you to integrate your scripts into continuous integration and continuous deployment (CI-CD) workflows, enhancing automation and streamlining deployment processes.

Conclusion

The Page Scripting Tool in Microsoft Dynamics Business Central is a robust solution for automating user acceptance testing and streamlining processes. By understanding the basics of recording and playing back scripts, and adhering to best practices, you can leverage this tool to enhance your system’s efficiency and reliability. As the tool evolves, stay tuned to our blog for updates and advanced techniques. Feel free to share your experiences or ask any questions in the comments below. Your feedback is always welcome!
Berny Düring

Mehr über Business Central