Support Article

Service Case attaching itself to Incorrect Interaction

SA-36791

Summary



When user launches the serivce case of one interaction and creates the new phone call one after the other. The newly created service case is getting attached to new created interaction instead of the interaction from where the service case is launched.

Error Messages



Not Applicable


Steps to Reproduce



Launch interaction portal.
Create
serivce case for one interaction
And then create new phone call one after the other.

We would observe, the newly created service case is getting attached to new interaction instead of the interaction from where the service case is launched.


Root Cause



A defect in Pegasystems’ code or rules

On further analysis it is observed that doUIAction of phone call is getting triggered first and then new interaction work object is created. Along with it in CPMSetPortalContent D_CPMPortalContext.pyID is getting updated and later doUIAction of service case work object is getting triggered and finally work object is getting created.

In CPMSetDefaults, .CAPArentID is getting set to D_CPMPortalContext.pyID i.e. the newly created phone call. And in this way service case is getting linked to incorrect interaction.

Resolution




Perform the following local-change:

1) Add a custom class (customMyIcon) on Icon (InteractionPhoneIcon_CRM.png) i.e. phone and email icon in "CPMInteractionPortalHeader" Section.



2) Paste below code in USERWORKFORM

<script>
function deactivateIcon() {
var parDoc = window.parent.document;
$(parDoc).find(".customMyIcon").each(function() {
var imgIcon = $(this).find('img')[0];
if (imgIcon) {
var evntData = $(imgIcon).attr("data-click");
if (evntData && evntData.length > 0) {
$(imgIcon).attr("custom-data-click", evntData);
$(imgIcon).attr("data-click", "");
}
}
});
}

function activateIcon() {
setTimeout(function() {
var parDoc = window.parent.document;
$(parDoc).find(".customMyIcon").each(function() {
var imgIcon = $(this).find('img')[0];
if (imgIcon) {
var customclick = $(imgIcon).attr("custom-data-click");
if (customclick && customclick.length > 0) {
$(imgIcon).attr("data-click", customclick);
$(imgIcon).attr("custom-data-click", "");
}
}
});
}, 1000);
}
</script>



3) Use "deactivateIcon()" as the first action and "activateIcon()" as last action on Label (for ex: Address Change) or on buttons where the issue is observed.

i.e on pyLabel in CPMDisplaySuggestedTask section.



Published April 20, 2017 - Updated April 25, 2017

Have a question? Get answers now.

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