Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Validation error messages not displayed through DX API

SA-91862

SUM MARY

When the '/cases/{id}' API is initiated using the PUT method to save a case, Validation messages do not display in the API response. The system, displays an HTTP 500 response instead.
The validation works while submitting a form using the '/assignment/{ID}' POST method.



Error Messages



HTTP 500


Steps to Reproduce

  1. Create a case using the '/cases' API.
  2. Update some data on the screen.
  3. Trigger a Save request to save the case using the '/cases/{id}' PUT method (the pyUpdateCaseDetails flow action is added in the casetype as a case wide action).
  4. Update the pyUpdateCaseDetails Validate rule in the Application layer to add a field validation.
  5. Initiate a request from the frontend such that the validation fails.


Root Cause



In a browser-connected session, the Save button invoked a special Work- Save activity. In the DX API, the '/cases/{ID}' PUT method is used with the pyUpdateCaseDetails flow action for Save.
The pyUpdateCaseDetails (that is, the Edit button) must display the Relevant Records of the case. Since all the fields of a given flow action are Relevant Records, this must work. However, in this usecase, the field that the user attempted to set is the pyNote, which is not a Relevant Record. Hence, the error occurred..
The pxUpdateCaseDX privilege is removed from the access group, such that field level security check is not performed and the error message displayed.



Resolution



Perform the following local-change:

Set pyNote as a Relevant Record in the class.
Suggest Edit

Published January 20, 2020 - Updated December 2, 2021

Did you find this content helpful? Yes No

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us