How to hide a UI macro button on a form

jeff12345
Kilo Contributor

Hi all,

I wrote a UI macro that creates a button so that users can click it to upload documents to a form instead of clicking the paperclip at the top of the form. Then, I created a formatter using that UI macro so I could use it on my form. I want the button to be hidden when the user loads the form, only appearing after the user selects a choice from a dropdown list on the form. I tried writing a client script, but the button doesn't respond to "g_form.setDisplay(". Any help in solving my problem would be greatly appreciated. Thanks!

1 ACCEPTED SOLUTION

bernyalvarado
Mega Sage

You can use the show_related_records out of the box UI macro as an example of how to manage the visibility of a UI macro within the macro code itself.



https://yourinstanceurl/nav_to.do?uri=sys_ui_macro.do?sys_id=2d8f82a2eb2031001c13abf11206fe83



Thanks,


Berny


View solution in original post

6 REPLIES 6

Thanks for your help!


mandy_zhao
Kilo Contributor

Hi Jeff,


Have you worked out the solution? I have to hide kb_view_common_header_toolbar ui macro base on different user role. Do you have any idea?