pzAttachFile shows superfluous screen ‘Attach content’ with msg
pzAttachFile shows superfluous screen ‘Attach content’ with message.
In a screenflow with an input screen which includes several input fields and also a button to add a file of a specific category, if the user omits to add a file a validation error is given by use of function “A [attachment category] is [attached/not attached] to the current case”.
The validation error is given in relation to another property on the screen.
Now the user wants to correct his omission and clicks ‘Add’ button. Next pzAttachFile displays a superfluous screen ‘Attach content’ with only a green Attach button.
Once clicked, the normal opening screen for pzAttachFile comes, with a warning hint to Choose files to proceed.
When the user selects a file this is accepted, but the category for this attachment is set to ‘file’ instead of automatically selecting the value as specified in the parameter for pzAttachFile.
Steps to Reproduce
- Create a flow action within an assignment.
- Add a screen with a button to add a file.
- Add a validation to the flow_action based on the function “A [attachment category] is [attached/not attached] to the current case”.
- Run the assignment without adding a file and click submit. Validation error will be given on top of the screen.
- Click the button to add a file. Same text of the validation is now shown within popup screen ‘Attach content’ together with green Attach button.
- After clicking the normal functionality to select a file is shown.
- Once a file is selected to be attached, the screen shows the name of the selected file but without the correct category.
Validation message is not getting cleared, which is causing the issue.
Perform the following local-change:
Previous to the action with the Flow in Modal dialog and pzAttachFile, execute an activity Page-Clear-Messages.
By doing so, the validation message that interfered with pzAttachFile gets cleared and now pzAttachFile is always working fine as expected.
An alternate solution is to use the Attach Content Out-of-the-box (OOTB) Control.