- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2025 02:16 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: and "edit" buttons we need to hide the edit button when region is USA and show when region is Europe can anyone suggest how to achieve this i have uncheck the "omit edit button" and added the script in "omit edit condition" sharing script but it is not working
if (current.region=="europe"){
answer = true;
}
else{
answer=false;
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2025 03:25 AM
do this in script in Omit Edit Condition script field
If that field is not on form then add it
give the correct field name and choice value
if (parent.region == "usa"){
answer = true; // this means omit
}
else{
answer=false; // this means show
}
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 02:31 AM
Hi @Shabbir1
Script you mension is corrent, Can you verify with clearing cache once?
also you can debug what region is returning the value by using: gs.info("Region value: " + current.region);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2025 03:25 AM
do this in script in Omit Edit Condition script field
If that field is not on form then add it
give the correct field name and choice value
if (parent.region == "usa"){
answer = true; // this means omit
}
else{
answer=false; // this means show
}
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