Need to hide "New" button from refrence look up window.

Ankit Upadhyay1
Tera Contributor

Whenever we search any content in a reference field in service catalog,A New button is displayed there, How to hide that "New" button from reference look up window?

10 REPLIES 10

Ankit Upadhyay1
Tera Contributor

As per the customer requirement they just want to hide that button in that look up field so no one can create new entry from the look up field.


Hi Ankit,



I am not sure if you can hide it only from the list. However the New button will be visible to all who has the create access on the target table.


Anthony_vickery
Tera Expert

To hide the 'New' button for the sys_ref_list view, configure the list control and add the following into the 'Omit New Condition' field:


RP.getParameterValue('sysparm_view') == 'sys_ref_list'


If this script returns true, the New button will be hidden.


RP refers to the page's Render Properties and amongst other things, provides access to the URL parameters.


Reference fields and variables always use the 'sysparm_view' parameter with the value of 'sys_ref_list' for the reference lookup window


one of the greatest shortcuts I have seen...Thank you Anthony!   We have to hide the "new" button on sys_ref_list because I have filtered views that specify how the records get added based on roles and location.   Managing all those views is such a hassle and it's so much easier to just disable the functionality and force the users to utilize the navigation we supply.


cwilkerbb
Giga Expert

You can use the Visibility Related List at the bottom of the UI Action form.



How to omit 'New' button from Service Catalog reference varuiable