- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2015 12:03 PM
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!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2015 12:53 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2015 12:38 PM
At of curiosity, are you able to hide it with a UI policy?
If so you can write a custom condition using:
if(g_form.isNewRecord())
to determine if it's a new record or not.
If that doesn't work - you will be forced to use DOM manipulation (which will get flagged in an ACE report). The drawback as this has the potential to break during upgrades. (although it's not very likely to happen)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2015 12:50 PM
Hi Jeff, the visibility of the UI macro is often managed within the code of the UI macro itself.
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2015 12:53 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2015 12:53 PM
I hope you find this helpful!