how to hide new button in portfolio form but visible in demand form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2024 11:12 AM
hi,
I need guidance to hide new button based on a specific role in a related list (List banner button) which resides in portfolio form but i need to ensure the button visible in demand form. I've tried script as below but it is not working. Can anyone guide me on how to achieve this?
ui action condition script
current.canCreate() && !RP.getListControl().isOmitNewButton() && RP.isRelatedList() && !RP.isManyToMany() && (gs.hasRole('portfolio_manager') && current.getTableName() == 'pm_portfolio' )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2024 11:46 AM
Hi Patricia,
Seems I don't understand your issue, I have one 'New' button defined for the 'pm_portfolio' table and one defined for 'dmn_demand'. Since they are separate, edit either as desired. For example, make it in-active:
https://<instance_name>.service-now.com/sys_ui_action_list.do?sysparm_query=GOTOname%3DNew%5Etable%3Dpm_portfolio%5EORtable%3Ddmn_demand&sysparm_view=
From you screenshot, seems you want the New button removed from the "Risks" related list.
https://<instance_name>.service-now.com/sys_ui_action_list.do?sysparm_query=GOTOname%3DNew%5Etable%3Drisk&sysparm_view=
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2024 12:12 PM
Hi Bert,
Yea i want to remove the new button from the risks related list based on a speific role. Provided screenshot for your reference. Kindly advise how to hide the new button accordingly.
retain the new button under demand
remove the new button under portfolio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2024 05:23 PM
Update the OOB UI Action and add logic as you desire, I don't know how you distinguish tables there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2024 09:56 AM
Thank you for your input.
