We have a requirement to show dirty pop up when user click on a button while working on a case in perform harness. Button presents in “pyCaseHeaderOuter” section specific to our application and on click of that button local action will launch a model dialog.
When user has edited some fields on the screen and click on the button “X” in “pyCaseHeaderOuter” section, we should display a dirty pop up with “You are about to discard your unsaved changes” before mode dialog launches on the screen.
Followed Approach:
Create a non auto-generated section with below script
Embed non-autogenerated section rule on top of the screen main section which has editable fields on the screen.
Launch the portal and direct to required screen of WO and edit some of the fields in main section which is mentioned on step 2.
Add refresh other section on click of button “X” on “pyCaseHeaderOuter” section to refresh the editable fields main section.
Please help if anyone is having an idea why embedded script is not working and why we are not getting the dirty pop up on customized button click when user has edited fields on the ui ?
In 8.2.1, if we close the case screen without changing the text in RTE, dirty pop-up is not displayed.
In 8.6**.5**, if we try to close the case screen without changing the text in RTE, dirty pop-up is displayed.
This is because the RTE changes the text to include style to
elements automatically. When RTE is loaded, the content is automatically changed to add styles to elements, causing the form to tag as dirty.
Details below: RTE is displayed with text from email history. In 8.2.1, if we close the case screen without changing the text in RTE, dirty pop-up is not displayed.
From 8.6.5 onwards this behaviour of isDirty happening is observed because of the addition code added in the fireChangeEvent () in pzpega_ui_richtexteditor.js .
I believe the fix must have been implemented OOTB after 8.6.3. The engineering team stated: 'Whenever any input is populated in RTE, if list element is present in the input it’s font-size is getting changed as per the inner span. Which is causing dirty popup even though client is populating data through data transform’
(There are users who want to revert it back to the ‘old’ functionality and this has been logged under enhancement request, FDBK-93582)
Your issue is logged against 8.5.6, so it might be worth you testing your scenario in the latest version . The code change was added to fix style issues that were observed when content was copied from an external source (work document / website) and pasted in a RTE.
If you need further help with this, and if there is not further response here on the forum, then I suggest that you log a support incident for this on the MSP.