I want to hide the "New" button on the list screen displayed from the reference field.

bonsai
Mega Sage

I would like to hide the "New" button from the list screen that appears when you click the "i" icon in the reference field.

I would like to leave the "New" button on the normal list screen transitioned from the module.

How should this be implemented?

If you can set the view on the list screen after clicking the "i" icon, you can hide it by setting the UI action, but...

 

small_list.JPG

2 ACCEPTED SOLUTIONS

harshav
Tera Guru

This is how it works if the user has create access to the reference table. if the users don't want to see that button then remove the create access on that table.

 

But if you want to customize the global new button then you can add this condition to it along with the exsisting one

!(RP.getParameterValue('sysparm_view')=='sys_ref_list' && RP.getParameterValue('sys_target')=='your_table_name')

View solution in original post

Tai Vu
Kilo Patron
Kilo Patron

Hi @bonsai 

The view when you click on the lookup icon is sys_ref_list.

You can leverage the RenderProperties API to set conditions in the UI Action or in the Omit new condition of List Control. Both of them should works.

Sample below specific for Requested for [requested_for] field in the Request [sc_request] table.

Omit new condition

 

RP.getParameterValue('sysparm_view')=='sys_ref_list' && RP.getParameterValue('sysparm_target')=='sc_request.requested_for';

 

 

Cheers,

Tai Vu

View solution in original post

5 REPLIES 5

Thanks for answering, you made my day 🙂  I can’t tell you how amazing my expository essay writing experience has been. Quality was my number one concern, and they have exceeded my expectations! top essay writing https://www.topessaywriting.org/expository-essay-writing-service put your needs first, provide high-quality content, and best of all, it happened almost immediately! The pricing is reasonable, the policies are very protective, and what’s more, you can try out free samples before committing to anything, and with their vast database of top writers, you can be sure you’re getting the best of the best. Highly recommend it for the exceptional quality of your essays!