Limit edit button on reference list to not show up for incident
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-23-2024 01:22 PM
I am trying add a condition to not show edit button when the reference is from incident. I tried to use parent.sys_class_name='incident' in the Omit Edit condition. Doesn't seem to be working. Any ideas on how to access the parent type?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-23-2024 01:50 PM - edited ‎10-23-2024 01:53 PM
Hello, may be once give a try with Conditional script like: parent.sys_class_name=='incident'
Alternatively you can also try this:
var parentTable = g_form.getReference('parent', function(parentRecord) {
if (parentRecord.sys_class_name == 'incident') {
return true;
}
return false;
}
If my response proves useful, please mark it "Accept as Solution" and "Helpful". This action benefits both the community and me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-23-2024 04:52 PM
Tried it but no luck. Also tried
RP.isRelatedList()&&parent.sys_class_name=='incident'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-23-2024 06:17 PM
@samadam Try to see if you can adjust condition in ui action for Edit..below is ui action.
/sys_ui_action.do?sys_id=f954408f53460110843addeeff7b12dc
Please mark my answer correct and helpful if this works for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-23-2024 05:48 PM
Hey @samadam ,
I have tried this on child incident related list on incident table and its working for me