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

Table of Contents

Article

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

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

Published July 23, 2014 — Updated October 2, 2015

Have a question? Get answers now.

Visit the Pega Support Community to ask questions, engage in discussions, and help others.