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

Cannot save draft affter system show error



On submit of the case, violate the validations set on the fields, the system then displays error messages which the developer sets in the Validate rule(server side validation error), click 'Saves Draft' button and close the case.

The issue is when user tries to reopen the case, the form does not retain the values which were filled previously before saving and closing it,  where as it retains the values perfectly incase of client side validations.


Error Messages

Here server side error messages getting displayed is not the issue. Not retaining the values after clicking on save draft is the issue.

Steps to Reproduce

 1. Create a section with fields configured with server side validations. 
 2. Create case and input data.
 3. Click 'Submit'. System displays error message.
 4. Click 'Save Draft' and closes this case.
 5. Search and open case again.

When open Case again, data that has been included still is kept in the case.

When open Case again, data that has been included is not kept.

Root Cause

In UpdateWorkObject, user is calling Validate activity and doing rollback in case of error messages. But in the current use case the errors are pre-existing on primary page and after validate activity call it is doing rollback.


Perform the following local-change: 

Save draft calls UpdateWorkObject activity and it has a call to UpdateDefaults in Work- class.

UpdateDefaults is an available activity and it can be overridden in application ruleset, to clear the error message on primary page using page-clear-messages.

Steps :

1.Open UpdateWorkObject activity as shown below

2.Open the UpdateDefaults.

3. Do a save as of the above rule and save it in your application ruleset in either work- class or application class.

4. Add the Page-Clear-Message step as shown below.

Now run the scenario, one must be able to retain the data even after the validate rule is thrown.
Suggest Edit

Published May 4, 2016 - Updated October 8, 2020

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