---
title: "Fix PMD PATCH unrecognized field Error (SSO vs Postman)"
description: "Why an outbound PATCH from a Workday Extend PMD page fails with 400 unrecognized field while Postman succeeds, and how to inspect and sanitize self.data in…"
url: https://kiweely.com/guides/workday-extend-pmd-patch-unrecognised-field-sso-vs-postman
---

# Why PATCH from an SSO PMD Page Fails with unrecognized field While the Same Payload Succeeds in Postman

When a PATCH request to an Extend Model Business Object fails with 400 unrecognized field from an SSO PMD page even though the same fields succeed in Postman, widget valueOutBinding declarations are merging extra keys into self.data. Log json:asJSON(self.data) and return a clean payload in onSend.

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

## Why `PATCH` fails with `unrecognized field: <fieldName>` from a PMD page when Postman succeeds

After adding new `TEXT` or `SINGLE_INSTANCE` fields to a Workday Extend Model Business Object (`MBO`), submitting an edit page or microEdit page via an outbound `PATCH` endpoint (`https://api.us.wcp.workday.com/apps/{appId}/v1/customRecords/{recordId}`) can fail with HTTP `400 Bad Request` and `unrecognized field: <fieldName>`.

This failure is especially confusing when:

-   Querying the new fields in `WQL` (`SELECT crFieldB FROM customApp_a1b2c3_customRecords`) works without error.
-   Every field on the Business Object shares the exact same `defaultSecurityDomains` and field-level security policy.
-   Copying the JSON payload and sending a `PATCH` request directly from Postman to the exact same URL and record ID succeeds with HTTP `200 OK` and saves the values.

Because the page endpoint uses `"authType": "sso"` while Postman uses an OAuth Bearer token, it is easy to mistake this for an SSO-vs-Bearer authentication bug. In practice, two distinct mechanisms cause a PMD `PATCH` request to fail with `unrecognized field` while Postman succeeds:

1.  **PMD `valueOutBinding` merges hidden or misspecified widget bindings into `self.data`:** Before executing your outbound endpoint’s `onSend` script, the PMD runtime automatically collects every widget on the page (or parent page/micropage hierarchy) whose `valueOutBinding` targets that endpoint name and merges those keys into `self.data`. If a widget has a typo in its `valueOutBinding` path, binds to the wrong endpoint, or outputs a nested wrapper object, `self.data` contains extra keys that you did not manually construct.
2.  **SSO persona lacks `Modify` permission on a field-specific security domain:** In the Extend Model Object REST API, if a specific field is secured by a security domain where the logged-in `sso` persona lacks `Modify` (`PUT`/`PATCH`) access—while the API Client / ISU used in Postman has `Modify` access—the schema validator for that persona rejects the restricted field in a `PATCH` payload as an unrecognized/disallowed property.

## Step 1: Log `json:asJSON(self.data)` inside `onSend` to inspect the true merged payload

Rendering a helper variable in a `readOnlyText` widget on the page before clicking submit does not show what `valueOutBinding` injects into `self.data` at submission time.

To see the exact object that PMD passes into the outbound endpoint, add `console.debug(json:asJSON(self.data));` at the top of the endpoint’s `onSend` script:

json

```
{
  "name": "patchCustomRecord",
  "baseUrlType": "app",
  "url": "<% 'customRecords/' + routeParams.recordId %>",
  "httpMethod": "PATCH",
  "authType": "sso",
  "onSend": "<%
    console.debug('Inbound self.data from valueOutBinding: ' + json:asJSON(self.data));
    return self.data;
  %>",
  "failOnStatusCodes": [
    { "code": 400 },
    { "code": 403 },
    { "code": 404 },
    { "code": 500 }
  ]
}
```

Open the browser / Extend developer console logs after reproducing the `400` error and inspect the logged JSON string. Look for:

-   Field names with a casing mismatch (`crfieldB` vs. `crFieldB`) introduced by a widget’s `valueOutBinding`.
-   Extra keys from read-only display widgets, search boxes, or grid helper columns (`isNewRow`, `descriptor`, or nested `data` arrays) that were bound to `patchCustomRecord`.
-   Single-instance relationship fields where a widget bound a plain string `"3aa555..."` instead of an object `{"id": "3aa555..."}` (or vice versa for a `TEXT` field).

## Step 2: Test a minimal single-field payload in `onSend` to isolate `valueOutBinding` vs. SSO security

Next, temporarily bypass `self.data` inside `onSend` and return a minimal hard-coded object containing only one of the failing fields:

json

```
"onSend": "<%
  console.debug('Raw self.data: ' + json:asJSON(self.data));

  var payload = {
    'crFieldB': '1'
  };

  console.debug('Sanitized outbound payload: ' + json:asJSON(payload));
  return payload;
%>"
```

### Outcome A: The minimal `payload` succeeds with `200 OK`

If returning `{'crFieldB': '1'}` from `onSend` succeeds on the SSO page, the Business Object schema and SSO permissions are valid—the failure was caused by `self.data` carrying polluted properties from widget `valueOutBinding` declarations.

Fix the endpoint permanently by constructing and returning an explicit allow-listed JSON object inside `onSend` rather than returning `self.data` directly:

json

```
"onSend": "<%
  var cleanPayload = {
    'crFieldA': fieldAWidget.value ?? '',
    'crFieldB': fieldBWidget.value ?? '',
    'crFieldD': fieldDWidget.value ?? '',
    'crFieldF': fieldFWidget.value ?? '',
    'crFieldG': fieldGWidget.value ?? '',
    'relatedWorker': empty(workerListWidget.value)
      ? null
      : { 'id': workerListWidget.value[0] }
  };
  console.debug('Sending clean PATCH payload: ' + json:asJSON(cleanPayload));
  return cleanPayload;
%>"
```

### Outcome B: Even `{'crFieldB': '1'}` fails with `400 unrecognized field` on the SSO page

If the minimal single-field payload still fails under `authType: "sso"` while succeeding in Postman:

1.  Check **Compare Postman User vs. SSO Persona:** Verify whether your Postman OAuth token was generated for an Integration System User (`ISU`) or an administrator, while the PMD page is being tested as a non-admin employee or manager.
2.  Run **Refresh Extend Model Component Cache** in the tenant so the presentation runtime’s cached schema for the Business Object matches the REST API gateway’s schema.
3.  Inspect the `.bo` file in your app source: check whether `crFieldB` has a field-level `"securityDomains"` array overriding `"defaultSecurityDomains"`, and run **Activate Pending Security Policy Changes** after confirming the SSO user’s security group has **Modify** permission on that domain.

## How to verify the fix in your tenant

1.  Open the PMD edit page or micropage signed in as the target SSO user persona, edit all newly added fields (`crFieldB`, `crFieldD`, `crFieldF`, `crFieldG`), and submit the page.
2.  Confirm in the developer console that `Sending clean PATCH payload` logs a flat JSON object containing only declared Business Object fields and returns HTTP `200`.
3.  Query the record in **View WQL Query Result** (`SELECT workdayID, crFieldB, crFieldD, crFieldF, crFieldG FROM <app>_customRecords WHERE workdayID = '<recordId>'`) to verify that every updated field value persisted in the tenant.

## Sources checked

-   [outboundEndPoints](https://developer.workday.com/documentation/kdd1594147277519)
-   [outboundDataURI](https://developer.workday.com/documentation/yzz1530025276777)
-   [Reference: PMD Scripting Logging](https://developer.workday.com/documentation/baq1581495151995)
-   [Reference: Model Component Error Codes](https://developer.workday.com/documentation/unm1655407599184)
-   [Define Endpoint Authentication in the PMD](https://developer.workday.com/documentation/yea1530546235609)

## Related guides

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

-   [### Handling Silent GraphQL Errors in PMD and Orchestrate When HTTP Status Returns 200 OK Workday Graph API endpoints return HTTP 200 OK even when a query or mutation fails with an S21 or validation error inside the JSON errors array. Inspect $.errors explicitly in Orchestrate and verify that your .amd base URL version matches Graph API Explorer.](https://kiweely.com/guides/workday-graphql-http-200-silent-mutation-errors)
-   [### Clearing Single-Instance Relationships to Null and Binding createdBy with graph:createId() in Graph API Workday Graph API mutations require nested IdentifierInput objects for single-instance relationships like createdBy—which you can generate cleanly in PMD with graph:createId(id). To clear an existing single-instance relationship back to null, use the Model Business Object REST PUT or PATCH API.](https://kiweely.com/guides/workday-graphql-clear-single-instance-null-graph-createid)
-   [### Splitting New and Existing PMD Grid Rows in onSend for Bulk POST and PATCH Without Duplicating Records When an editable PMD grid with isArrayOutBinding: true is bound to both POST ?bulk=true and PATCH ?bulk=true endpoints, sending unfiltered self.data duplicates existing rows. Tag newly added rows in onRowAdd or check empty(row.id) and filter self.data inside each endpoint’s onSend script.](https://kiweely.com/guides/workday-extend-pmd-split-new-modified-grid-rows-bulk-post-patch)
-   [### Escaping Single Quotes for Multi-Value IN Clauses and Fixing Double URL-Encoded Unicode in PMD WQL Dynamic WQL queries in Workday Extend PMD fail when comma-separated attribute strings are wrapped in a single pair of quotes or when instanceListQuery is double URL-encoded. Split and quote each ID individually, and call string:urlDecode(instanceListQuery) before building the WQL string.](https://kiweely.com/guides/wql-pmd-single-quote-escaping-double-urlencoded-unicode)

### More guides on Extend apps and pages

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

-   [Deleting Selected Grid Rows and Fixing Parallel Multi-Instance Arrays Collapsing on Edit Pages in Workday Extend PMD](https://kiweely.com/guides/workday-extend-pmd-grid-delete-selected-rows-parallel-arrays-collapse)
-   [Displaying dynamicColumns in a Workday Extend PMD Grid and Flattening Nested Arrays into Rows](https://kiweely.com/guides/workday-extend-pmd-dynamic-grid-columns-flattening-arrays)
-   [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)
-   [Clearing Grid Cell Validation Errors on onChange and Blocking Page Save on pageActionButton Failure in Workday Extend PMD](https://kiweely.com/guides/workday-extend-pmd-clear-grid-cell-error-pageactionbutton-block-save)
-   [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)
-   [Working Around the 10-Relationship Limit on a Workday Extend Model Business Object (MCBO) Using a Helper Object](https://kiweely.com/guides/workday-extend-mcbo-10-single-instance-relationship-limit-helper-bo)
-   [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)

### From the blog on Extend apps and pages

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

-   [Why Workday Extend doesn’t need to be a developer-only tool](https://kiweely.com/blog/extend-not-developer-only)
-   [What AI developer tools do you get with Workday Extend, and is a generic chatbot enough?](https://kiweely.com/blog/kiweely-vs-generic-ai-for-workday-extend)
-   [Why Workday Test Automation Fails Before Step 1: Data Footing, Proxy Access, and Cleanup](https://kiweely.com/blog/when-workday-test-automation-fails-data-footing-and-security)

## 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.
