I have a custom file import control, based on pxFileUpload. I want to check if file name length is under 255 bytes, the limit for Linux, and display an error if true. I made a js function that calculates byte length, but I can't figure out how to create a red text error message under control from inside that function.
This solution from pxFileUpload didn't work for me:
I also tried creating a section that displays .pzErrorMessage property next to the control. Although said property is supposed to be filled by "pyMaxFileSizeViolation" activity, it didn't work either. What can I do?
***Edited by Moderator: Pallavi to update platform capability tags***
You are using Pega JS API pega.u.d.reloadSection to refresh the section and run activity on refresh. Does the activity is triggered on error? Have you traced the pyMaxFileSizeViolation activity to check whether the activity is triggered on error?
Please share the code of control where you have customized from pxFileUpload to know more about the issue.