Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

How to customize the message “You are closing or replacing an open work item."

Updated on September 25, 2019

To customize the PRPC-provided message window, "You are losing or replacing an open work item", make sure that the required hotfixes are installed on your system, then override the Field Value pyMessageLabel in your application ruleset with your own custom localized labels.

Explanation

When you close a work item tab, the WorkFormStandard HTML fragment and the pega_ui_doc.js files provide the localized values for messages in the browser pop-up window.

  1. The pega_ui_doc.js text file calls the doClose() function, which in turn calls the closeWork() function in the pega_ui_doc.js rule.
  2. The closeWork() function calls the isFormDirty() function to check if the work form was edited.

The isFormDirty() function looks for the line of code that displays the pop-up message:

confirm(confirm(sMsg1+"\n\n"+ sMsg2 +"TEST \n" +sMsg3))

  1. If the isFormDirty() function returns yes, then the appropriate default message is displayed to the user.

Looking at the line of code evaluated by the isFormDirty() function, you can see that the PRPC-provided messages – sMsg1, sMsg2, and sMsg3 – are driven by Field Value rules.

<alt+text=Field Value pyMessageLabel You are closing or replacing an open work item>

<alt+text=Field Value pyMessageLabel Click OK to continue and lose any unsaved changes>

<alt+text=Field Value pyMessageLabel Click Cancel to return to the open item>

Suggested approach

To customize any of the PRPC-provided pyMessageLabel rules that are driven by Field Value rules and evaluated by doClose() calling closeWork() calling isFormDirty(), complete these steps:

  1. Run the Update Manager System Scanner to verify that the required hotfix is installed on the PRPC system:
    • PRPC 6.1 SP2 HFix-3615
    • PRPC 6.2 SP1 HFIX-7601
    • PRPC 6.2 SP2 HFix-6036
    • ​PRPC 6.3 SP1 HFix-7851
  2. If the hotfix is not installed on your PRPC system, download it from My Support Portal in the Hotfix Self-Service area, and install it using Update Manager.
  3. Override the Field Value pyMessageLabel in your application ruleset, specifying your customized Localized Labels for the messages to display when closing a work item tab after editing a work form.

Additional information

User Interface

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us