Drag and Drop attachments-Default Category is not set
On Pega 7.1.8, user has a portal where they use out of the box functionality to add attachments.
When the user adds an attachment by dragging a file, the file is uploaded but the Category Dropdown is not set according to the file selected. They do not have the default value "File" in the dropdown for Drag and drop.
Steps to Reproduce
1) Open any work object.
2) Go to Attachments tab, click on "Add" link. A popup appears to drag and drop a file.
3) After the file is dropped, the Category is not defaulted to any value which used to work in Pega 7.1.6.
As part of backward compatibility, “Select..” placeholder is present in the dropdown. So by default, if "File" option is unchecked, "Select" will be shown.
The user requires to use the following local-change:
1. Create a wrapper activity called "SetDefaultAttachmentCategory" in your ruleset. From this activity you can either call pzInitAttachContent activity in the first step of this activity or add the Page-New step which is in pzInitAttachContent. Then Set a property pyAttachmentPage.pyCategory to "Test2" or whatever value you want to set.
2. Add an entry in Pages & Classes tab of this activity with ‘pyAttachmentPage’ as page name and class as ‘Data-WorkAttach-File’.
3.) Open "pyAttachContent" flow action and override pyAttachContent flow action and configure the newly created activity in the above steps as pre-processing activity.
Note: While overriding pyAttachContent flow action and updating the pre-processing activity, one can notice the parameters that are getting cleared for post processing activity. Ensure the AttachPage parameter exists in the Post-Processing activity while saving.
0% found this useful