Skip to content
KiweelyKiweelyKiweely

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
  • Applies to Workday Extend
  • 4 min read
  • Published
  • By Kiweely
On this page

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

Related guides

All guides

Let Workday check the work.

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

Get the next guide in your inbox.

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

We’ll email you once to confirm. Unsubscribe in one click from any issue.