Support Article
Notes getting attached to wrong Work Object
SA-21872
Summary
After implementing a solution where emails are generated with multiple Work Object links, when opening the different Work Object links in multiple tabs in IE simultaneously and trying to add notes, the notes are copied over to wrong work object.
Error Messages
Not Applicable
Steps to Reproduce
- Generate an email with multiple work object links.
- Open different Work Objects simultaneously in different tabs.
- Add notes to the different work objects without closing them.
- Observe notes getting copied over to wrong work object.
Root Cause
A defect in Pegasystems’ code or rules that results in multiple work objects utilizing the same thread.
Resolution
Perform the following local-change:
Save the WorkLink.Email Corr Fragment into an application ruleset, and replace the existing code with the following:
=========================================================================
{%
tools.putSaveValue("PublicLinkURL",pega_procom_pegaprocomutilities.getPublicLinkURL());
%}
{WHEN useDesktop}
<a target="_blank" href="https://community.pega.com/%7B%24save%28PublicLinkURL%29%7D?pyActivity=RedirectAndRun&ThreadName=%7B.pyID%7D&Location=pyActivity%3DWork-.Open%26Action%3DReview%26HarnessPurpose%3DReview%26InsHandle%3D%7B%25%3Cbr%20/%3Etry%20%7B%3Cbr%20/%3EappendString%28pega_rules_utilities.encodeURLParameter%28tools.getDatabase%28%29.getHandle%28tools.getStepPage%28%29%29%29%29%3B%3Cbr%20/%3E%7D%20catch%28DatabaseException%20de%29%20%7B%20appendString%28pega_rules_utilities.encodeURLParameter%28tools.getProperty%28".pzInsKey").getStringValue())); }
%}">{.pyID}</a>
{ELSE}
<a target="_blank" href="https://community.pega.com/%7B%24save%28PublicLinkURL%29%7D?pyActivity=RedirectAndRun&ThreadName=%7B.pyID%7D&Location=pyActivity%3DWork-.Open%26Action%3DReview%26InsHandle%3D%7B%25%3Cbr%20/%3Etry%20%7B%3Cbr%20/%3EappendString%28pega_rules_utilities.encodeURLParameter%28tools.getDatabase%28%29.getHandle%28tools.getStepPage%28%29%29%29%29%3B%3Cbr%20/%3E%7D%20catch%28DatabaseException%20de%29%20%7B%20appendString%28pega_rules_utilities.encodeURLParameter%28tools.getProperty%28".pzInsKey").getStringValue())); }
%}">{.pyID}</a>
{/WHEN}
=========================================================================
This code utilized RedirectAndRun to call Work-.Open, and allows the specification of a distinct thread. Please note that, as the thread name is just the pyID, there is still the possibility that a user could overwrite data if they open the same work object twice.
Published April 13, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.