- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2025 05:03 AM - edited 03-20-2025 05:04 AM
Hi Team,
on problem we have a field region drop down (1usa 2 Europe) and in related list we have "change requests" in that we have "ADD" button we need to hide the 'ADD' button when region is USA and show when region is Europe can anyone suggest how to achieve this there is no omit option for "ADD" in list control and when i am checking in UI actions it is in change_request table .how can fetch problem field values on that UI action is it possible to do this..?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2025 10:19 PM
parent object should work
parent object -> will be the problem record
See here, I was able to show the Add button only for PRB0000011 and hide for other problem
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
03-20-2025 10:19 PM
parent object should work
parent object -> will be the problem record
See here, I was able to show the Add button only for PRB0000011 and hide for other problem
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
03-24-2025 03:57 AM - edited 03-24-2025 03:57 AM
Hi @Ankur Bawiskar , Thank you for your response i have added parent.region its working fine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2025 05:27 AM
Hi maybe you can write script include and call it from UI action condition, script include look like this you can modify the code,
UI action: scriptInlcudeName().checkRegion(current.problem_id) //assuming problem_id is field used for linking
fucntion: checkRegion(){
if (ProblemID) {
var problem = new GlideRecord('problem');
if (problem.get(ProblemID)) {
if (problem.region == '1') { // Assuming '1' is USA
return false; // Hide the button
}
return true;
}
}
}
Please mark correct/helpful if this helps you!