- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2023 07:26 AM
Hi Team,
I have created a field called shipping address as in the below screenshot, its a reference field. After we click on the reference icon, it opens the list of locations(cmn_location), I do not want the New button to be visible there.
Note:The New button should be visible when we open cmn_location.LIST ,Or directly open the locations
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2023 07:11 AM
@Community Alums
I did the same for problem_id field on incident table and it removed new button on lookup list
if(RP.getParameterValue('sysparm_view') == 'sys_ref_list' && RP.getParameterValue('sysparm_target') == 'incident.problem_id')
answer = true;
else
answer = false;
It's showing when I opened problem list using problem.list
New button is hidden on lookup list
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2023 06:57 AM
Can anyone help on this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2023 07:03 AM - edited 05-31-2023 07:12 AM
@Community Alums
when you open that lookup list; you do right click on list header and in list control use Omit New condition script field and add that logic
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2023 07:11 AM
@Community Alums
I did the same for problem_id field on incident table and it removed new button on lookup list
if(RP.getParameterValue('sysparm_view') == 'sys_ref_list' && RP.getParameterValue('sysparm_target') == 'incident.problem_id')
answer = true;
else
answer = false;
It's showing when I opened problem list using problem.list
New button is hidden on lookup list
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2023 07:08 AM
@Ankur Bawiskar Actually if we do that it will also hide the New button from the locations table list view when we directly navigate over there.
is there any other way?