how to hide new button in portfolio form but visible in demand form

PatriciaA987250
Tera Expert

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' )  

7 REPLIES 7

Moin Kazi
Kilo Sage
Kilo Sage

Hi @PatriciaA987250 

 

You need to go to list control of your specific related list and there you can check Omit New button checkbox.

 

See below -

MoinKazi_0-1728282711444.png

MoinKazi_1-1728282803766.png

 

if you want your button should be hide for specific table then you can use Omit new condition script and return true or false as per script condition

 

Please mark this response as correct or helpful if it assisted you with your question.

 

Regards

Moin

Thank you for providing the steps.

You can try adding "&& !g_user.hasRoleExactly('itil')"

 

to the condition of the UI Action "New" defined on the 'risk' table. Change 'itil' above to your desired role.