Question
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
HCL
SG
Last activity: 16 Feb 2017 11:25 EST
Confirmation message is not displaying while closing WO
Issue:
Confirmation message "You are about to close an open work item which has changes that have not been saved." is not displaying while closing edited Work Item.
Steps to Replicate:
1. Create new case.
2. Fill all the fields and submit it.
3. Validation fails on one or more fields and displayed on the screen
4. Try to close the Work Object Tab. It will not prompt any message
Observation
Prompt message is not shown only when there are errors on the screen on submitting the form, and right away user tries to close the case.
If user edit something, then he is prompted with message.
Expected Result:
It should prompt user to Save or Discard the work item. Since user is not prompted and work item is closed. He is losing all the inputted data.
It is rework for user to enter all the fields again.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689977000/ca5d61dc-47bd-406c-8ea6-9d6a790a4f7e.jpg?itok=O3xagdnP)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689977000/ca5d61dc-47bd-406c-8ea6-9d6a790a4f7e.jpg?itok=O3xagdnP)
Pegasystems Inc.
IN
Sorry for late reply. I did try the same today and it worked.
Below is the flag and code that you can put in UserWorkForm.
function formStillDirty(){
pega.u.d.gDirtyOverride = true;
}
You can call this function by using Run script UI action from Close button action before actually closing the WO so that it will reset this flag. But you have to make sure that this is only reset if there are errors in WO (you can pass a parameter to this js function).
Let us know if this helps :)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Pegasystems Inc.
IN
Hi Bharat,
Please check whether you have overridden pega.u.d.gDirtyOverride property value. If the value is true then you will not get the pop up.
Also, have you customized the pyDirtyCheckConfirm section ?
Please share your observations.
Best Regards,
Mounika
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Pegasystems Inc.
IN
HI ,
I could see the similar behaviour inhouse
see if this helps
https://community.pega.com/support/support-articles/confirmation-message-not-displaying-while-closing-edited-wo
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689977000/ca5d61dc-47bd-406c-8ea6-9d6a790a4f7e.jpg?itok=O3xagdnP)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689977000/ca5d61dc-47bd-406c-8ea6-9d6a790a4f7e.jpg?itok=O3xagdnP)
Pegasystems Inc.
IN
This is expected behavior. When user have not submitted initially, then dirty prompt is provided to confirm that he might loose the data. Since user have submitted the form once and knows that there are errors and ideally he will fix the errors and submit the form again.
Do you have a particular business case that would help us in understanding why user is submitting and closing the case ?
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
HCL
SG
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
HCL
SG
Can anyone suggest local change to tackle above scenario.
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689977000/ca5d61dc-47bd-406c-8ea6-9d6a790a4f7e.jpg?itok=O3xagdnP)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689977000/ca5d61dc-47bd-406c-8ea6-9d6a790a4f7e.jpg?itok=O3xagdnP)
Pegasystems Inc.
IN
There is a dirty check attribute that decides whether to prompt for confirmation message. I am assuming that is getting reset after submit since the WO is not dirty anymore. If you can find a way to set that attribute, this issue could be solved. I will also try out the same and let you know if this solves the issue.
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
HCL
SG
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
HCL
SG
Accepted Solution
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689977000/ca5d61dc-47bd-406c-8ea6-9d6a790a4f7e.jpg?itok=O3xagdnP)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689977000/ca5d61dc-47bd-406c-8ea6-9d6a790a4f7e.jpg?itok=O3xagdnP)
Pegasystems Inc.
IN
Sorry for late reply. I did try the same today and it worked.
Below is the flag and code that you can put in UserWorkForm.
function formStillDirty(){
pega.u.d.gDirtyOverride = true;
}
You can call this function by using Run script UI action from Close button action before actually closing the WO so that it will reset this flag. But you have to make sure that this is only reset if there are errors in WO (you can pass a parameter to this js function).
Let us know if this helps :)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
HCL
SG
Thanks for your response.
I resolved the issue by having a section having HTML content and I have gDirtyOverride property to true in that section. Then I have embedded that section in the perform harness.