Posted: 22 Jun 2016 6:35 EDT Last activity: 23 Jun 2016 13:44 EDT
Force user to save the form before going to other action
We need to force the user to save the form if there is any change in the fields before they go for other actions. For example, user has opened a flowaction and modified few fields. Now they are going to perform some other actions which are available in "Other Action" tab . If user didn't save the current form then they will loose the data if they change the action without saving it.
We would like to implement functionality like "Close" button.
I can understand that if there are 2-3 fields where we need to add onChange action then it's ok. But if you have around 20 fields then I don't think it's good design to add OnChange in each field as user might get irritated during filling the form.
Often, this is handled not by forcing the user to do anything but rather by making sure they get a warning that they have unsaved changes so they can choose whether to save them or throw them away.
The warning is often presented by the browser, when it sees that the user is closing the window while the window is "dirty". Is that for some reason not happening? If so, is the app or Pega layer incorrectly clearing the "dirty" flag? /Eric
If you try to close a work object then pega internally calls "isFormDirty" to check if the form is dirty.
For example, user opens an assignment(A) and fill up the form. Now they want to perform other tasks which are available in "Other Action" tab . Let's say they want to perform flowaction B. So the requirement is if there is any change in flowaction A then system should give warning message that already some fields are changed so they need to save it before doing any other action.Though we provided "Save" button but some time user forget to save and perform other task. And when they return back to main flowaction they loose all the data.
It would be good to know when Pega needs to check "isFormDirty" and when the browser would intervene and warn you that you are about to close an unsaved page. If the browser will do it, then neither Pega or the layered Pega app would need to do it. /Eric