D365 F&O Examples

These helpers wrap common Finance and Operations patterns such as module navigation, dropdowns, lookups, multi-select fields, and grid actions.

Common helpers

Helper

Use for

Example

modulesNavigation(...)

Open a module path from the left navigation

await leapwork.d365.fno.modulesNavigation(page, "accounts payable", "vendors", "all vendors");

SelectDropdown(...)

Select a standard D365 dropdown value

await leapwork.d365.fno.SelectDropdown(page, { controlName: "Currency", value: "USD" });

SelectLookupOption(...)

Pick a value from a lookup popup

await leapwork.d365.fno.SelectLookupOption(page, { controlName: "Vendor account", value: "US-001" });

MultiSelect(...)

Select one or more values in a multi-select field

await leapwork.d365.fno.MultiSelect(page, { controlName: "Sites", values: "Site A;Site B" });

grid.quickFilter(...)

Filter a grid by a column value

await leapwork.d365.fno.grid.quickFilter(page, { columnName: "Name", value: "Contoso" });

grid.selectRow(...)

Select a specific grid row

await leapwork.d365.fno.grid.selectRow(page, { gridId: "VendTableListPage_Grid", primaryKey: "US-001" });

expandAllTabSections(...)

Open all form sections

await leapwork.d365.fno.expandAllTabSections(page);

collapseAllTabSections(...)

Collapse all form sections

await leapwork.d365.fno.collapseAllTabSections(page);

Module navigation

Three-level navigation

await leapwork.step("Open All vendors", async () => {
  await leapwork.d365.fno.modulesNavigation(
    page,
    "accounts payable",
    "vendors",
    "all vendors"
  );
}, {
  action: "click",
});

Four-level navigation

Use the optional fourth hierarchy level when the tile opens a nested sub-tile.

await leapwork.step("Open Workflow history", async () => {
  await leapwork.d365.fno.modulesNavigation(
    page,
    "common",
    "inquiries",
    "workflow",
    "workflow history"
  );
}, {
  action: "click",
});

Form controls

Standard dropdown

await leapwork.step("Select USD in Currency", async () => {
  await leapwork.d365.fno.SelectDropdown(page, {
    controlName: "Currency",
    value: "USD",
  });
}, {
  action: "click",
});

Lookup popup

await leapwork.step("Select vendor account", async () => {
  await leapwork.d365.fno.SelectLookupOption(page, {
    controlName: "Vendor account",
    value: "US-001",
  });
}, {
  action: "click",
});

Multi-select field

await leapwork.step("Select sites", async () => {
  await leapwork.d365.fno.MultiSelect(page, {
    controlName: "Sites",
    values: "Site A;Site B",
  });
}, {
  action: "click",
});

Grid actions

Quick filter

await leapwork.step("Filter vendors by name", async () => {
  await leapwork.d365.fno.grid.quickFilter(page, {
    columnName: "Name",
    value: "Contoso",
  });
}, {
  action: "input",
});

Select a row by primary key

await leapwork.step("Select vendor row", async () => {
  await leapwork.d365.fno.grid.selectRow(page, {
    gridId: "VendTableListPage_Grid",
    primaryKey: "US-001",
    primaryKeyColumn: "Vendor account",
  });
}, {
  action: "click",
});

Select a dropdown value inside a row

await leapwork.step("Set row status", async () => {
  await leapwork.d365.fno.grid.selectRowDropdownOption(page, {
    gridId: "VendTableListPage_Grid",
    controlName: "Status",
    primaryKey: "US-001",
    primaryKeyColumn: "Vendor account",
    value: "Approved",
  });
}, {
  action: "click",
});

Sections and tabs

await leapwork.step("Expand all sections", async () => {
  await leapwork.d365.fno.expandAllTabSections(page);
}, {
  action: "click",
});

await leapwork.step("Collapse all sections", async () => {
  await leapwork.d365.fno.collapseAllTabSections(page);
}, {
  action: "click",
});

Notes

  • Use labels and control names exactly as they appear in D365.

  • Prefer the D365 helpers over raw selectors when a helper already exists.

  • For navigation, modulesNavigation(...) is case-insensitive and supports both 3-level and 4-level paths.

  • For MultiSelect(...), pass multiple values as a semicolon-separated string such as "Site A;Site B".

  • For grids, use primaryKey plus primaryKeyColumn when the row must be selected deterministically.