Support Article
Getting error while opening file from Pulse
SA-2842
Summary
User is getting "unable to open the attachment. You lack the required permissions" error while opening attachments from Pulse.
Error Messages
Unable to open the attachment. You lack the required permissions.
Steps to Reproduce
Try opening an attachment from Pulse.
Root Cause
The root cause of this problem is defect/misconfiguration in the PRPC operating environment. “pzDisplayFileName” control was overridden to call doAttachmentSingleClick function from pypega_ui_HarnessActions js file. This function contains a call to GetAttachmentReference activity.
That activity does an Obj-Open based on param.linkInsHandle, which is now missing.
Param.linkInsHandle is set in pzGetSocialAttachmentReference according to the insKey passed through the function call. This piece of logic is missing from the processing now in this case.
Resolution
This issue is resolved through the following local change:
Issue 1:
The “pzDisplayFileName” control was overridden to call doAttachmentSingleClick function from pypega_ui_HarnessActions js file. This function contains call to GetAttachmentReference activity.
This activity does an obj-open based on param.linkInsHandle, which is now missing. param.linkInsHandle is set in pzGetSocialAttachmentReference according to the insKey passed through the function call.
This piece of logic is missing in this case.
Solution: modify the control "pzDisplayFileName" to call doAttachmentSingleClick function from pypega_social which will now handle the above logic.
Issue 2:
After making the above changes an additional issue is present: On click event is not getting triggered.
This is because pypega_social js file is overridden in application rule sets. Seems like this is not fully overridden as there is no doAttachmentSingleClick function in this js file.
Solution: For second issue, either override the complete pypega_social js file or remove the call for invoking the object in the current overridden js file. Because of this object, the main pega pulse object is becoming out of context and there is no access to doAttachmentSingleClick function.
The “pzDisplayFileName” control was overridden to call doAttachmentSingleClick function from pypega_ui_HarnessActions js file. This function contains call to GetAttachmentReference activity.
This activity does an obj-open based on param.linkInsHandle, which is now missing. param.linkInsHandle is set in pzGetSocialAttachmentReference according to the insKey passed through the function call.
This piece of logic is missing in this case.
Solution: modify the control "pzDisplayFileName" to call doAttachmentSingleClick function from pypega_social which will now handle the above logic.
Issue 2:
After making the above changes an additional issue is present: On click event is not getting triggered.
This is because pypega_social js file is overridden in application rule sets. Seems like this is not fully overridden as there is no doAttachmentSingleClick function in this js file.
Solution: For second issue, either override the complete pypega_social js file or remove the call for invoking the object in the current overridden js file. Because of this object, the main pega pulse object is becoming out of context and there is no access to doAttachmentSingleClick function.
Published January 31, 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.