Publish Post Case Review (PCR) to Work Notes Instead of Additional Comments
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Overview
Out of the box (OOB), when a Post Case Review (PCR) is published using the Publish to Case button, the final PCR content and its attachment are added to the Additional Comments field of the related Case.
Requirement
For internal users, the PCR content and its attachment must be added to Work Notes instead of Additional Comments - not only for the parent case, but also for all related child cases.
Purpose of This Article
This article explains:
Which OOB Script Includes are involved in the PCR publish flow
How to extend and override the logic using editable Script Includes
Note: Most of the OOB Script Includes involved in this process are read-only, so the solution requires extending or overriding the logic rather than modifying OOB code directly.
OOB Configuration (Default Behavior)
When a user clicks Publish to Case on the PCR record:
A UI Action is triggered.
The UI Action calls a chain of Script Includes.
The PCR content and attachment are written to Additional Comments on:
The parent case
Any child cases (if applicable)
Step 1: Identify the UI Action
Navigate to: System UI → UI Actions
Open the UI Action: Publish to Case
Step 2: Identify the Initial Script Include
The Publish to Case UI Action calls the Script Include: CaseDigestUtilAjaxSNC (Read-only)
Open the CaseDigestUtilAjaxSNC Script Include and locate the method: publishtoCase
Step 3: Trace the Script Include Flow
The "publish to Case " method calls another Script Include: CaseDigest (Editable)
The CaseDigest Script Include extends the following Script Includes:
CaseDigestImpl (Read-only): Calls the "addAdditionalCommenttoCase" method
CaseDigestDao (Read-only): Contains the "addAdditionalCommenttoCase" method
These Script Includes together handle the logic for publishing the PCR content to the Case.
Step 4: Review CaseDigestDao (OOB Logic)
The CaseDigestDao Script Include contains the actual database update logic responsible for adding PCR content to the Case (in the method "addAdditionalCommenttoCase").
In the OOB implementation, the logic explicitly updates the Additional Comments field on the Case record.
Note: Since this Script Include is read-only, it cannot be modified directly. Need to create another SI.
Step 5: Override Logic in Editable Script Include
Because CaseDigestImpl and CaseDigestDao are read-only, the behavior must be overridden in the CaseDigest Script Include.
Step 5.1: Update CaseDigest Script Include
In the CaseDigest Script Include:
Redefine the "addAdditionalCommenttoCase" logic
Update the implementation to:
Write the PCR content to Work Notes instead of Additional Comments
Ensure the PCR attachment is added to the Case record
This change ensures that the parent case receives the PCR content and attachment in Work Notes.
Step 6: Handle Child Cases (Major Case Scenario)
When a Case has child cases:
OOB behavior prompts the user to confirm whether the PCR should be published to the child cases
If the user confirms, the PCR content is added to the Additional Comments field of each child case
To change this behavior, additional Script Includes must be reviewed and overridden.
Step 7: Identify Child Case Publish Logic
The child case publishing logic is handled by the following Script Includes:
MajorCaseDigest (Read-only)
MajorCaseDigestImpl (Read-only)
Inside MajorCaseDigestImpl, locate the method: bulkPublish()
This method is responsible for publishing the PCR content to child cases and, in the OOB configuration, writes the content to Additional Comments.
Step 8: Create Custom Script Include for Child Cases
Because MajorCaseDigestImpl is read-only:
Create a new custom Script Include (for example: Custom_MajorCaseDigest)
Replicate the OOB "bulkPublish()" logic
Modify the logic to:
Write PCR content to Work Notes
Copy the PCR attachment to each child case
Step 9: Update Script Action Trigger
The Script Action triggers the child case publishing process: Major Case Propagate
Update this Script Action to:
Call the custom Script Include
Invoke the modified bulkPublish() method
Final Outcome
After completing the above steps:
The PCR content and attachment are added to Work Notes for the parent case
The same behavior is applied to all child cases
No OOB read-only Script Includes are modified
- Labels:
-
Customer Service Management