Save and Exit Case by Disabling Required Fields
Hi,
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:
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.
Thanks,
-Jose