How to Easily Use Page Scripting Business Central for User Acceptance Testing

Streamline UAT with Page Scripting in Business Central During the testing and user acceptance phases of your Dynamics 365 Business Central implementation, accuracy and efficiency are […]

Published: Oct 28, 2024 •

Streamline UAT with Page Scripting in Business Central

During the testing and user acceptance phases of your Dynamics 365 Business Central implementation, accuracy and efficiency are critical—especially when financial workflows are involved. The Page Scripting tool empowers your team to record and replay test scenarios directly within the web client, ensuring customizations perform reliably before going live. This not only reduces manual testing effort but also enhances confidence in your system’s readiness.

Customizations tailored to your organization’s needs must undergo rigorous testing to function flawlessly. And that’s where Page Scripting in Business Central shines. The powerful tool simplifies user acceptance testing (UAT) within the web client, ensuring your custom applications work as intended before going live. By leveraging Business Central Page Scripting tool effectively, you can avoid costly errors and save time.

Our guide on using the Page Scripting Tool in Dynamics 365 Business Central is crucial for your success. It provides clear, actionable steps to ensure your applications perform seamlessly. It’s designed to help you maximize the potential of your custom solutions and drive your business forward.

Why Finance Leaders Should Care About Page Scripting in Business Central

  • Reduce Risk of Costly Errors
    Automate testing of customizations to prevent financial misstatements and system failures.
  • Accelerate User Acceptance Testing (UAT)
    Record and replay test scenarios to validate financial workflows quickly and consistently.
  • Ensure Data Integrity
    Validate that journal entries, invoices, and reports behave as expected across environments.
  • Lower Testing Costs
    Minimize manual testing effort and reduce reliance on external consultants.
  • Boost Confidence in Custom Solutions
    Empower finance teams to test and verify system changes without deep technical skills.
  • Improve Compliance and Audit Readiness
    Ensure financial processes meet internal controls and external audit standards.
  • Streamline Deployment Cycles
    Catch issues early and deploy updates faster with reliable test coverage.

Step-by-Step Guide on Page Scripting in Business Central

The page scripting tool allows you to capture your interactions within the Business Central web client, such as opening pages or entering data, and replay these actions later. This is particularly useful for UAT, where you can record a test once and replay it multiple times to ensure consistent results.

Opening Page Scripting Business Central

page scripting business central opening
  1. Access the Tool:
    • Open the Business Central web client.
    • Navigate to the Settings menu (cogwheel icon).
    • Select Page Scripting (this option is available only if you have the necessary record or playback permissions).
  2. Starting the Tool:
    • The Page Scripting Business Central pane opens on the right side of the screen.
    • Choose to start a new recording or open an existing one for inspection or replay.

Recording Actions

image 1
  1. Start a New Recording:
    • Click Start new or navigate to New > New recording in the toolbar at the top of the pane.
    • A solid red circle in the toolbar indicates that recording has started.
  2. Perform Actions:
    • Perform the actions you want to capture, such as opening pages, making selections, and entering data.
    • The tool captures these interactions and the resulting actions.
  3. Pause and Resume:
    • To pause the recording, click the Stop button in the toolbar.
    • To resume, click the Start recording button again.
  4. Delete Steps:
    • If needed, you can delete the last captured step during the recording process.
image 2

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. See below for further details.

Copy to and Paste from Clipboard

Page Scripting Business Central comes with its own clipboard that lets you copy field values and insert them in other fields, use them in expressions, or use them to validate results.

image 3
  • Copying Values:
    • Right-click a page control (e.g., a field).
    • Select Copy from the context menu.
  • Pasting Values:
    • Right-click a page control.
    • Select Paste from the context menu.

Paste Session Info

  • Insert Session Information:
    • Right-click a control.
    • Select Paste > Session Info > User ID to insert the user ID or other session information.

Validate a Given Outcome

image 4
  • Insert Validation Steps:
    • Right-click a control.
    • Select Validate to insert a validation step with the current value.
    • Modify the value if needed by accessing the step’s properties.

Make Steps Conditional

  • Add Conditional Steps:
    • Right-click a page control.
    • Select Add conditional steps when and choose the condition.
    • Add steps to be performed if the condition is met.
    • End the condition branch by selecting End scope in the steps list.
image 5

Edit Captured Steps

  • Edit Steps:
    • Use the context menu (…) on a step to access options like Properties.
    • Modify properties such as values or conditions, using Power Fx expressions for calculations if necessary.
image 7

Handle Optional Pages

  • Make a page optional if it doesn’t always appear in the flow.
  • Select the recorded step for the page.
  • Use the context menu to select Make this an optional page.
image 8

Playback

  1. Playing a Recording:
    • Select the Play button in the toolbar.
    • During playback, navigate steps using the Forward and Backward buttons.
  2. Playback Controls:
    • Go back to the beginning of the recording.
    • Run the recording up to a specific step by selecting Run to here from the context menu.
  3. Playback Results:
    • The tool shows whether each step was successful (green check mark) or failed (red exclamation mark).
    • Review the results for validation steps.
image 9

Saving and Sharing Recordings

  1. Save a Recording:
    • Save the recording from the toolbar.
    • This creates a YAML file that you can download, share, edit, and reopen for playback.
  2. Share a Recording:
    • Select Share in the toolbar to generate a link.
    • The link includes the full recording and its playback result.
image 10

Supported Capture Actions

Page Scripting in Business Central focuses on actions within the web client. It does not automate elements outside this environment, such as control add-ins, embedded Power BI, or Power Apps. By leveraging the Page Scripting tool in Dynamics 365 Business Central, you can streamline your UAT processes, ensuring higher test coverage and reducing the cost and effort associated with manual testing.

Business Central System Review: Fix Underperforming Implementations and Optimize Your Dynamics 365 Investment

If these challenges sound familiar—manual testing, missed issues, costly delays, or lack of confidence in your customizations—they may point to deeper problems in your current Business Central setup.

Inefficient UAT often signals poor configuration, outdated customizations, or gaps in partner delivery. 360 Visibility’s Business Central System Review Assessment is designed to uncover these root causes and provide a clear roadmap for optimization. Through a comprehensive audit of your existing implementation, we identify operational inefficiencies, security risks, and underutilized features, then deliver actionable recommendations to stabilize, enhance, or reconfigure your system.

Don’t let testing challenges derail your strategic objectives—schedule your Dynamics 365 Business Central System Review today and ensure your Business Central implementation performs at its full potential.

Related Posts