Hide fields before they will be displayed

Andrii
Kilo Guru

So I want to hide some fields on Incident Forma before they will be displayed and Loading Dialog described here is not an option. Every time Form gets loaded - I can see how fields displayed and then hiding. I don't want user to see this.

I read value from scratchpad and then use that value in Client Script to hide/show certain field. That is a bit slow - is there a way to make it work faster and not noticable for end user?

1 ACCEPTED SOLUTION

Ravi Prasad1
Tera Guru

Best solution for this is writing ACL's instead of UI policy or client scripts.



If use write ACL's then if user did not meet the access levels then fields will not be visible on form load.


Whereas if you use UI policies or Client scripts then while form loading those fields will be visible for some seconds then hide.




View solution in original post

14 REPLIES 14

nthumma
Giga Guru

Did you try hiding using UI Policy ? Basically UI policies executes before   form load.


Where did you get information that UI Polcies load before form load?


If you were able to review article that I've mentioned - it says that onLoad Client Scripts execute before UI Polciies.



Can you Justify your information?


its based on my personal experience and i have tested it on my personal instance before answering question.



my apologies if i my statement is wrong.


Gurpreet07
Mega Sage

Form take too much time in loading if its having too many of client scripts or client script is having complex logics in it or there are synchronous server calls in onload client scripts. Using Glide record in onload scripts increase loading time a lot. You may need to troubleshoot your client scripts to make loading faster and this issue will be fixed automatically. Also you could try with display business rule to hide fields.