D365 Set Toggle Button


The Toggle Button block is used to control toggle switches in Dynamics 365 Finance & Operations (D365 F&O) web applications. Toggles are commonly used to enable or disable options, and this block allows you to explicitly define the desired state, ON or OFF, as part of your automation.

Note: This block is only available in browser sessions launched using the Login block or when recording through the D365 Fusion Recorder. It cannot be added manually via the standard block menu.

The block is created automatically when the user interacts with a toggle during a D365 recording session. Once captured, the toggle state and other properties can be reviewed and adjusted as needed before saving the recording.

Fully expanded, the D365 Set Toggle Button blockshows the following properties:

image-20251119-085216.png

Note: The screenshot on this page uses the Elegance Design, introduced in 2025.3. If you are using an earlier version, your layout may look different.

Quick-start

  1. Launch the D365 Fusion Recorder and begin recording.

  2. Interact with a toggle control in the application (e.g., enable or disable a setting).

  3. Review and adjust the toggle state directly within the recorder interface.

  4. Save the recording to insert the Toggle Button block into the canvas.


Building block parameters

Parameters
  • Toggle state
    Defines the state the toggle should be set to. When this option is selected, the toggle will be turned ON. When left unselected, the toggle will be set to OFF. This provides clear control over binary configuration options in D365.

  • Fail
    This connector is triggered if the block fails to locate the toggle element within the specified timeout. It allows the flow to handle missing or misaligned UI elements gracefully.

  • Source element
    Optionally scopes the search for the toggle within a specific UI section or container. This is useful when multiple similar toggles exist on the same page.
    In early-access versions, this field may appear but is not editable.

  • Browser window
    Indicates the browser session where the toggle element should be found.
    In early-access versions, only one browser window is supported and this field is fixed.

  • Default timeout
    Determines whether the block uses the flow’s global timeout setting. When selected, the timeout is inherited; otherwise, the custom Timeout value is used.

  • Timeout
    Sets the maximum time in seconds to wait for the toggle element before the block fails.
    The default is 10 seconds if Default timeout is not selected.

Resources

Topic

Description

Flows FAQ

Common questions about creating, running, and managing flows in Leapwork.

Flows Troubleshooting

Guidelines and solutions for identifying and fixing issues that occur when building or running flows in Leapwork.

Fusion Recorder FAQ

Frequently asked questions about Fusion Recorder