Leapwork Documentation
Set Toggle Button
This feature is Early Access and may change based on user feedback and testing. Share your thoughts with our team to help us improve it.
The Set Toggle Button block is used to control toggle switches within a D365 F&Oweb application. It is automatically created when the user interacts with a toggle element during recording using the D365 Fusion Recorder.
Toggles are often used to enable or disable settings, and this block allows you to define the desired state, on or off, explicitly during automation.
Note:This block works only in browser windows launched using the Login block or within the current D365 recording session.
Fully expanded, the D365 Set Toggle Button blockshows the following properties:
The Block Header
The green input connector at the top left triggers the execution of the block when the automation flow reaches this step.
Once the toggle state is set, the green output connector activates to indicate success.
The block title is auto-generated based on the element toggled, such “Set Consolidate all notifications”,but can be renamed by double-clicking the header to improve readability and traceability in larger flows.
Toggle Value
This property defines the desired state of the toggle. If selected, the toggle will be set to the ONposition in the D365 application. If left unselected, the toggle will be turned OFF.This provides clear and direct control over settings that depend on binary options.
Not Found
This green output connector is triggered if the toggle element cannot be found within the set timeout period. It allows the automation to branch or handle the absence of the target element gracefully.
Source Element
This optional property allows you to scope the search for the toggle to a specific parent element, such as a particular section or container. This improves accuracy, especially when multiple similar toggles exist on the same page.
In Early Access versions, this field is present but not editable.
Browser Window
This field allows the user to specify the browser window instance in which the element should be found.
In Early Access versions, only a single browser session is supported, and this setting is not yet configurable.
Default timeout
If the Default Timeout property checkbox is not selected, then the timeout value is 10 seconds. If the property checkbox is selected, then the Default timeout value selected in the flow settings will be applicable.
Timeout
The maximum time spent extracting the specified information before giving up and triggering the Not Foundconnector (see above).
Note: All cases have a “global timeout” that can be configured in the “Settings” panel. This is unrelated to the timeout of a single building block. However, a running case will automatically be cancelled if it runs for longer than the global timeout.
Created 23.04.25