---
title: "Workday Extend PMD Grid Row Deletion & Parallel Arrays"
description: "Delete selected grid rows on submit instead of onRowSelect, and fix parallel multi-instance BO fields collapsing into a single row on PMD edit pages."
url: https://kiweely.com/guides/workday-extend-pmd-grid-delete-selected-rows-parallel-arrays-collapse
---

# Deleting Selected Grid Rows and Fixing Parallel Multi-Instance Arrays Collapsing on Edit Pages in Workday Extend PMD

Workday Extend PMD does not permit outbound DELETE calls inside onRowSelect, and storing grid columns as separate multi-instance fields on a single BO record causes edit grids to collapse into one row. Learn how to handle row deletion on submit and zip parallel arrays by index.

-   **Checked** against Workday on November 6
-   Applies to **Workday Extend**
-   3 min read
-   Published November 6
-   By Kiweely

## Why Outbound `DELETE` Endpoints Cannot Run Inside `onRowSelect`

In Workday Extend Presentation Metadata (PMD), grid selection events such as `onRowSelect` are designed for client-state and UI updates—such as filtering in-memory arrays, toggling widget visibility, or calculating subtotals—not for executing outbound write or `DELETE` transactions against Model Business Objects (MCBOs). Attempting to trigger an `outboundData` endpoint with `"httpMethod": "DELETE"` directly from `onRowSelect` fails because outbound write endpoints are only executed during page submission (`onSubmit` / `outboundEndPoints`) or when a deferred inbound endpoint is invoked from an action event.

Furthermore, deleting a database record the instant a user checks a selection box creates an irreversible side effect before the user clicks **OK** to confirm the page transaction.

## Pattern 1: Deleting Selected Grid Rows via `PUT` or `onSubmit`

Depending on how your Extend Business Object is modeled, use one of two patterns to remove rows selected by the user.

### Updating a Parent Business Object Collection with `PUT`

When the grid rows represent child business object instances linked to a multi-instance reference field on a parent Business Object, the cleanest transactional approach is to let the user select rows to remove (or use the built-in row removal minus `-` action when `doNotRemove` is `false`) and persist the remaining collection back to the parent Business Object using a `PUT` outbound endpoint on page submit.

json

```
{
  "type": "grid",
  "id": "detailsGrid",
  "label": "Roles and Organizations (Select Rows to Remove)",
  "selectionEnabled": true,
  "rows": "<% parentBoEndpoint.data[0].roleAssignments ?? [] %>",
  "rowVariableName": "row",
  "columns": [
    {
      "type": "column",
      "columnId": "childBOColumn",
      "label": "Assignment ID",
      "cellTemplate": {
        "type": "text",
        "id": "childBoId",
        "value": "<% row.id %>",
        "enabled": false
      }
    },
    {
      "type": "column",
      "columnId": "roleColumn",
      "label": "Role",
      "cellTemplate": {
        "type": "text",
        "id": "roleName",
        "value": "<% row.role.descriptor %>",
        "enabled": false
      }
    }
  ]
}
```

In the outbound `PUT` endpoint’s `onSend` event handler, filter out any rows that appear in `detailsGrid.getSelectedRows()` so only the retained child references (plus any newly added rows) are sent in the `PUT` payload:

javascript

```
"outboundData": {
  "outboundEndPoints": [
    {
      "name": "updateParentBo",
      "baseUrlType": "app",
      "url": "<% 'accessProvisioningRequests/' + queryParams.requestId %>",
      "httpMethod": "PUT",
      "authType": "sso",
      "onSend": "<%
        var allRows = detailsGrid.getRows();
        var retainedIds = [];
        for (var r : allRows) {
          if (!r.isSelected()) {
            retainedIds.add({'id': r.get('childBOColumn').value});
          }
        }
        return {
          'roleAssignments': retainedIds
        };
      %>"
    }
  ]
}
```

### Invoking a Bulk or Per-Row Delete on Page Submit

If each grid row is an independent top-level Business Object record without a parent wrapper, collect the IDs of the selected rows via `detailsGrid.getSelectedRows()` and pass them to your outbound delete endpoint or synchronous orchestration when the user submits the page, rather than inside `onRowSelect`.

## Pattern 2: Fixing Parallel Multi-Instance Arrays Collapsing into One Grid Row on Edit Pages

A common data modeling pitfall occurs when a developer creates a single Business Object to store a multi-row grid by defining separate multi-instance fields for each column—for example, `roleBasedwID[]`, `roleBasedSgName[]`, and `supervisoryOrganization[]`—all on the same Business Object instance.

When the user creates a request with two grid rows, Workday saves the values into those three parallel arrays on a single Business Object record. When the Edit page loads and queries the Business Object via a `GET` endpoint (`editSecurityPackage`), the response contains a single element in `data`:

json

```
{
  "data": [
    {
      "workdayID": "44349cf173149000d87bd095d6370000",
      "name": "CGJWBCJ",
      "roleBasedwID": [
        { "wID": "00707eaf108343a081a3f0a694743e67" },
        { "wID": "376a21a116974c789f80629966270730" }
      ],
      "roleBasedSgName": [
        { "name": "HR Partner" },
        { "name": "Alternate Owner" }
      ],
      "supervisoryOrganization": [
        {
          "supervisoryOrganization": [
            { "id": "e02485f863ec48d39a082bb95cc4abe4", "descriptor": "Human Resources" },
            { "id": "e50d309a6d8540e3b533219cfa2c330b", "descriptor": "Information Technology" }
          ]
        },
        {
          "supervisoryOrganization": [
            { "id": "e7dcf5926bdc40d6b6877f41f4c15387", "descriptor": "Accounting Operations" }
          ]
        }
      ]
    }
  ]
}
```

If you bind the Edit page grid’s `rows` attribute to `<% editSecurityPackage.data %>`, the grid sees a 1-element array (`data[0]`) and renders **only a single row**, collapsing all values from every parallel array into that one row.

### Rebuilding Grid Rows by Zipping Parallel Arrays with `.map()`

To render one row per entry when your data is stored in index-aligned parallel arrays on `data[0]`, use `.map((item, i) => ...)` in the grid’s `rows` binding to zip the parallel arrays at index `i` into an array of row objects:

json

```
{
  "type": "grid",
  "id": "roleBasedSecurityGroupsGridId",
  "label": "Role Based Security Groups",
  "gridType": "LIST",
  "isArrayOutBinding": true,
  "rowVariableName": "roleBasedSecurityGroupData",
  "rows": "<%
    empty(editSecurityPackage.data) ? [] :
    editSecurityPackage.data[0].roleBasedwID.map((wIDObj, i) => {
      {
        'securityGroup': {
          'id': wIDObj.wID,
          'descriptor': editSecurityPackage.data[0].roleBasedSgName[i].name
        },
        'suporgs': editSecurityPackage.data[0].supervisoryOrganization[i].supervisoryOrganization
      }
    })
  %>",
  "columns": [
    {
      "type": "column",
      "columnId": "sgCol",
      "label": "Security Group",
      "cellTemplate": {
        "type": "instanceList",
        "id": "sgInstanceList",
        "multiSelect": false,
        "selectedValuesAndDescriptors": "<% [roleBasedSecurityGroupData.securityGroup] %>"
      }
    },
    {
      "type": "column",
      "columnId": "supOrgCol",
      "label": "Supervisory Organizations",
      "cellTemplate": {
        "type": "instanceList",
        "id": "supOrgInstanceList",
        "multiSelect": true,
        "selectedValuesAndDescriptors": "<% roleBasedSecurityGroupData.suporgs %>"
      }
    }
  ]
}
```

Note how each `instanceList` inside `cellTemplate` binds `selectedValuesAndDescriptors` to its own row’s zipped slice (`[roleBasedSecurityGroupData.securityGroup]` for single-select and `roleBasedSecurityGroupData.suporgs` for multi-select) rather than referencing the entire parent array.

### Long-Term Data Model Recommendation

Zipping parallel arrays works only as long as every array (`roleBasedwID[i]`, `roleBasedSgName[i]`, `supervisoryOrganization[i]`) remains strictly index-aligned and no optional column is omitted on a row. Whenever possible, model each grid row as its own Child Business Object record linked to the parent via a multi-instance relationship field so `rows` binds directly to the child collection without manual array reconstruction.

## How to Verify in the Tenant

1.  Open the Create page in your Workday Extend tenant, add three rows to the grid with distinct single-select and multi-select `instanceList` values, and click **OK** to save the record.
2.  Open the Edit page for the saved record and verify that the grid expands into three separate rows with each row’s `instanceList` pre-populated with its exact saved selections.
3.  Select one row for removal, submit the Edit page, and re-open the record to confirm the removed row is no longer linked to the Business Object instance.

## Sources checked

-   [Concept: grid](https://developer.workday.com/documentation/tgx1652476064414)
-   [grid PMD Tag Reference](https://developer.workday.com/documentation/zmz1518211268000)
-   [Reference: PMD Scripting Widget Methods](https://developer.workday.com/documentation/hno1582318947208)
-   [Reference: PMD Scripting Events](https://developer.workday.com/documentation/tgy1581495452394)

## Related guides

[All guides](https://kiweely.com/guides)

-   [### Displaying dynamicColumns in a Workday Extend PMD Grid and Flattening Nested Arrays into Rows Workday Extend developers often confuse variable child rows with runtime-generated grid columns. This guide covers flattening nested RaaS or REST arrays into grid rows, configuring dynamicColumns with cellTemplates, and rendering arbitrary WQL SELECT fields using map:getKeys().](https://kiweely.com/guides/workday-extend-pmd-dynamic-grid-columns-flattening-arrays)
-   [### Clearing Grid Cell Validation Errors on onChange and Blocking Page Save on pageActionButton Failure in Workday Extend PMD Learn how to clear cell-level validation errors in Workday Extend PMD grids when a user updates a cell, avoid the getSelectedRows() border-highlighting trap during onSubmit, and block page submission when a pageActionButton deferred WQL lookup fails.](https://kiweely.com/guides/workday-extend-pmd-clear-grid-cell-error-pageactionbutton-block-save)
-   [### Working Around the 10-Relationship Limit on a Workday Extend Model Business Object (MCBO) Using a Helper Object Workday Extend enforces a platform ceiling of 10 SINGLE\_INSTANCE and MULTI\_INSTANCE relationship fields per Model Business Object (MCBO) and 25 delivered target relationships per app. Learn how to reserve the 10th slot for a 1:1 helper extension object and query across both objects in WQL.](https://kiweely.com/guides/workday-extend-mcbo-10-single-instance-relationship-limit-helper-bo)

### More guides on Extend apps and pages

[All 97 guides](https://kiweely.com/guides#extend)

-   [Conditional Page Routing on Load, multiStepLayout vs. tabBar Navigation, and flowVariables Payload Limits in Workday Extend PMD](https://kiweely.com/guides/workday-extend-pmd-conditional-page-routing-tabbar-flowvariables-limits)
-   [Resolving “Tenant mapping not found (OP-4008)”, EU vs. US Regional Base URL 401 Errors, and client\_secret\_basic in Workday Extend OAuth 2.0](https://kiweely.com/guides/workday-extend-oauth-tenant-mapping-op-4008-eu-base-url-client-secret-basic)
-   [How to Blank Out Text Fields and Nullify Reference Values on Workday Extend Business Objects via Inbound EIB Using {empty}](https://kiweely.com/guides/workday-extend-eib-clear-text-nullify-fields-empty-tag)
-   [Fixing “Object instance has properties which are not allowed by the schema (parentBusinessProcesses, initiationPageRoute)” on Extend Subprocesses](https://kiweely.com/guides/workday-extend-bp-subprocess-allowedparentprocesses-eventstepid)
-   [Cascading dropdowns and instance lists in Workday Extend](https://kiweely.com/guides/workday-extend-cascading-instance-lists)
-   [How to move Workday Extend apps to a new developer tenant before the old one expires or is deleted](https://kiweely.com/guides/workday-extend-move-apps-new-developer-tenant)
-   [Why a Workday Graph API query suddenly fails with “Cannot query field”](https://kiweely.com/guides/workday-graphql-cannot-query-field)
-   [How to build a worker search prompt in a Workday Extend page](https://kiweely.com/guides/workday-extend-worker-search)

### From the blog on Extend apps and pages

[All posts](https://kiweely.com/blog)

-   [How to Put Custom Employee Screens in Front of Workday Without a Workday Extend License](https://kiweely.com/blog/custom-employee-ui-for-workday-without-workday-extend)
-   [Workday Extend vs. Power Apps and ServiceNow App Engine: where to build a Workday app](https://kiweely.com/blog/workday-extend-vs-power-apps-servicenow-app-engine)
-   [What can you change in a Workday Extend app after its model components deploy?](https://kiweely.com/blog/workday-extend-model-components-first-deploy)

## Let Workday check the work.

Kiweely writes WQL and builds orchestrations in your own tenant, and Workday, not Kiweely, says whether they passed.

[Start for free](https://kiweely.com/download) [See how it works](https://kiweely.com/vine/how-it-works)

## Get the next guide in your inbox.

One email a month with new guides and one Extend tip. Nothing else.
