- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-05-2016 11:12 PM
Hello All,
My requirement is as follow.
I need to hide "New" button on "Incident Task" related list on Incident form. I can't use "List Control" option because I have to hide button based on state of incident. And in List Control we have only option of adding condition based on Roles.
I can use client script. But, I want that to be my last option. Anything else apart from client script which can work, will be really helpful.
Any idea? I am not expert in service-now.
Thanks in advance.:-)
Vaibhav
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2016 01:41 AM
Hi Vaibhav,
The field "Omit new condition" is present post-dublin instances. Only thing you need to do is to personalize the List Control form and bring the "Omit new condition" field. Since your current instance has this field and other don't, you can (on your sandpit instance) remove this field from the List Control form , Save it. Again, redo it by bringing back the Omit new condition onto the form so as to capture in it an update set which can be further migrated to other instances.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-05-2016 11:17 PM
You can write a condition in UI action based upon your requirement.
e.g current.incident_state==7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-05-2016 11:30 PM
Hi harish,
Yes, I can do that. But, issue is "New" Button is in Global Scope. I can create new button with changed scope. But, lot of rework. You know any other way?
Thanks,
Vaibhav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2016 12:45 AM
Vaibhav,
There is provision in the List Control to Omit "New" button based on some conditions. You need to write a script under the field "Omit new condition" such as to hide New button on Incident task related list. Steps to write this script:
1. Right click on the related list Incident task
2. Go to Configure -> List Control
3. Script the "Omit new condition" part like below:
if (incident_state == 7) //say '7' is the 'InProgress' state
true;
else
false;
4. Click on Update.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2016 01:29 AM
Hi kunal,
Yes, I did exactly like this. Thing is one of my Instance is on Fuji patch 9. Where I have Field "Omit New Condition". So I wrote below script.
if(parent.state == 6 || parent.state == 7){
current.omit_new_button = true;
}
And it worked as expected! 🙂
But, issue is I have sandpit on patch 9. Other 3 instances including PROD is on patch 4. Where this field "Omit New Condition" is not there.:-(
Not sure this issue is from service-now end.
I am stuck because of this.