Applies to Pega Platform 7.2-8.5
As an application developer, you can avoid common problems in designing error display behavior if you first understand the basic principles of Pega error display. Reviewing examples of commonly reported problems in Pega applications can deepen your understanding and sharpen your skills in effectively presenting errors in the application user interface.
Specifying error display behavior
Debugging error display issues – Important use cases
Perform harness errors display
Common problems
Specifying error display behavior
Edit the Display option tab in the harness to configure the error display behavior.
There are three types of error display:
-
Default
-
Top of Harness
-
In Configurable Section
Error Display Type |
Explanation |
---|---|
Default |
Error displays on top and bottom of the harness. |
Top of Harness |
Error displays only on the top of the harness. |
In Configurable Section |
Error displays in a separate section that can be configured. Following are recommendations when using this error display type:
Every subsequent section refresh automatically reloads the error section. |
Debugging error display issues: Important use cases
The following table lists the parameters and use cases that are important to avoid issues with error display:
Parameter or Use Case |
Explanation or Solution |
---|---|
Errors with refresh section and refresh other section |
Errors on only the primary page (BaseRef) display after selecting the refresh and/or refresh other section options. |
Error display for read-only fields |
Validation occurs and error displays for read-only fields when the Show validation messages in Read Only Mode option is checked in the presentation tab of the field. |
pega.u.d.KeepPageMessages, pega.u.d.KeepMessages |
The pega.u.d.KeepPageMessages and pega.u.d.KeepMessages flags are used to persist errors on the page. These flags are sensitive, and they impact other existing behaviors. |
How screen readers interpret and read the errors |
role=alert attribute is added on the error tables when there are errors present for screen readers to immediately interpret and read them. |
Perform harness errors display
The following table lists the different combinations for perform harness error displays:
Form-level errors | Always show | Keep error display visible | Errors displayed |
---|---|---|---|
Default |
Yes |
Yes |
|
Default |
Yes |
No |
|
Default |
No |
Yes |
The error displays in caseHeader section only |
Default |
No |
No |
The error displays in caseHeader section only |
Top of harness |
Yes |
Yes |
The error displays out of perform harness with the close icon |
Top of harness |
Yes |
No |
The error displays from the perform harness with the close icon |
Top of harness |
No |
Yes |
The error displays in caseHeader section only |
Top of harness |
No |
No |
The error displays in caseHeader section only |
In Configurable section |
Yes |
Yes |
The error displays in caseHeader section only |
In Configurable section |
Yes |
No |
The error displays in caseHeader section only |
In Configurable section |
No |
Yes |
The error displays in caseHeader section only |
In Configurable section |
No |
No |
The error displays in caseHeader section only |
Common problems
The following table lists the commonly reported problems and how to prevent them:
Scenario |
Explanation |
Solution |
---|---|---|
Problem with using OOTB sections for custom error section, when setting is to display errors in custom error section. |
OOTB sections must not be used as custom error section because the error cleanup scripts in the cs_valid identify the tables with id ERRORTABLE and remove them leading to conflicts. |
Configure custom sections to include in custom error section. |
Validation message for a required field displays on top of the layout group. |
Error messages are appended to the layout group Document Object Model (DOM) (content-layout-group). |
|
Error messages overlap the upper content and display at the center of the screen. |
A defect or configuration issue in the operating environment. The error message populates with the flex Cascading Style Sheets (CSS) which is not completely supported on the Internet Explorer (IE) browser. |
Error messages overlap content and display at centre of screen |
After performing validations on click of the submit button, an error message displays on the screen. The error message does not contain any icon to close the error message. |
An issue in the custom application code or rules. User was using the Default Error display option in harness rule which was not displaying the Close icon. |
|
Error message does not display at field level. |
An issue in the custom application code or rules. |