NikitaZ2 Member since 2020 2 posts
Posted: 3 months ago
Last activity: 3 months ago

Use js to add error message under custom control

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:

var ActivityName="pyMaxFileSizeViolation"; pega.u.d.reloadSection(null,ActivityName,"",false,false,null,null,event);

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***  

Pega Platform 7.2.2 User Interface
Share this page LinkedIn