Customizations tailored to your organization’s needs must undergo rigorous testing to function flawlessly. And that’s where Page Scripting 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 Page Scripting Business Central effectively, you can avoid costly errors and save time.
Our guide on using the Page Scripting 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.
Step-by-Step Guide on Page Scripting 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
- 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).
- 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
- 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.
- 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.
- Pause and Resume:
- To pause the recording, click the Stop button in the toolbar.
- To resume, click the Start recording button again.
- Delete Steps:
- If needed, you can delete the last captured step during the recording process.
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.
- 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
- 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.
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.
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.
Playback
- Playing a Recording:
- Select the Play button in the toolbar.
- During playback, navigate steps using the Forward and Backward buttons.
- 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.
- Playback Results:
- The tool shows whether each step was successful (green check mark) or failed (red exclamation mark).
- Review the results for validation steps.
Saving and Sharing Recordings
- Save a Recording:
- Save the recording from the toolbar.
- This creates a YAML file that you can download, share, edit, and reopen for playback.
- Share a Recording:
- Select Share in the toolbar to generate a link.
- The link includes the full recording and its playback result.
Supported Capture Actions
Page Scripting 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 Business Central, you can streamline your UAT processes, ensuring higher test coverage and reducing the cost and effort associated with manual testing.
We Can Help You in Your Business Central Journey
For businesses looking to implement or optimize their Microsoft Dynamics 365 Business Central experience, collaborating with our team can be invaluable. As a leading Microsoft Partner, we have extensive experience in Page Scripting Business Central and can guide you through the complexities of implementation, customization, and testing.
Whether you are just getting started with Business Central or seeking to enhance your existing setup, 360 Visibility can help you achieve your goals with confidence.