Jose Navas (josenavas)
Jose Navas
josenavas Member since 2013 41 posts
Posted: August 25, 2020
Last activity: August 31, 2020
Posted: 25 Aug 2020 3:12 EDT
Last activity: 31 Aug 2020 12:54 EDT

Save and Exit Case by Disabling Required Fields


We have a use case to have a "Save and Exit" button within a screen flow. We need to save the case even when the form is incomplete since the user might not have the information at hand. I tried in my first approach to add a required condition to every field that is required, and then once I click the button run a DT that will make the condition of the required fields no longer relevant and then allow to Save the case. However, the client validations for the required fields are still triggered and I get stuck on the same screen.

For my second approach, I tried with two script functions running one after the other. The first script should disable the "dirty checking" so the next script doClose can close the case:

Action set and close

Again, this second approach stills triggers the client validations for the required fields... The doClose function expects to receive these arguments: event, dcCleanup, dcCleanupCallback, ignoreDirty, and fromReplaceDocument.

I'm not sure if this approach to set ignoreDirty actually works, but in any case you could take a look and hopefully suggest a new or better approach.



Pega Platform 8.4.1 User Experience Enterprise Application Development Dev/Designer Studio Communications and Media