Question
Dirty popup doesn't show
Hello,
We have a requirement saying:
When a user uploads a document but doesn't send it, a dirty popup displays when you quit the page.
However, the dirty popup isn't displaying.
To overcome this I tried to:
- Create a section within the section displaying the documents needed to be uploaded
- On the section, override the js function that sets the override dirty popup variable as the following:
<script>
pega.u.d.explorerFormIsDirty = function() {
if(console){console.log("explorerform dirty custom called");}
return true;
}
</script>
Issue:
When the section loads for the first time, the dirty pop shows when you quit the page, but if you try to upload a document (launches a local action), the dirty popup doesn't appear anymore.
Any ideas on how to solve this?
Thank you in advance.
I know this does not directly answer your questions, but have you considered a different approach? It's a little unintuitive to be presented with a dirty pop up in that scenario.
What if you setup some sort of validation to check if uploaded/sent = true? You could set this property after the document was sent.
And then check for this value when you submit the flow action.