- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2017 07:51 PM
Hi,
I would like to hide "New" button from "All" list based on the Module Name.
For exaample, if the module name is "My Incidents", it will show all my incidents with "New" button as list view by clicking on it.
But, this New button should not be displayed if it is under "My Incidents" list.
Could anyone help in this?
thanks
VG
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2017 12:04 AM
Sorry, one correction in my reply
if RP.getParameterValue('sysparm_userpref_module') =='sys_id'
{
return false
}
else
{
if (Existing condition value of New button)
return true
else
return false
}
regards

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2017 09:44 PM
Hi Varadharaj,
you can try in below way to hide New button on single module, else as Adam told please try with RP.getParameterValue('sysparm_userpref_module') == 'SYS ID for modules'.
Please find the New button for particular module (ex. Normal list of incident table) and then make that is Active = False
For new module you can create a custom New Button and override on Global one with Roles.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2017 11:45 PM
Hi VG,
Get the condition field of New button from UI Action and get the current page parameter value as "RP.getParameterValue('sysparm_userpref_module') =='sys_id' "
create a new Script include to return "true / false" based on the above Condition field value and current page parameter value as below
if RP.getParameterValue('sysparm_userpref_module') =='sys_id'
{
return false
}
else
{
if RP.getParameterValue('sysparm_userpref_module')
return true
else
return false
}
and replace the condition field of New button of UI Action with this Script Include.
hope this helps...
regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2017 12:04 AM
Sorry, one correction in my reply
if RP.getParameterValue('sysparm_userpref_module') =='sys_id'
{
return false
}
else
{
if (Existing condition value of New button)
return true
else
return false
}
regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2017 08:56 PM
So there are a couple of things...
First, the documentation says you should be able to do this via a script on the list control, but it doesn't seem to be working:
Advanced list control with scripts whenever I try something as simple as:
var answer;
answer = true;
answer;
it still shows. So not sure if this is a bug or what.
However, you can create a UI Action for Incident which will override the global one, so it'll only do this on incidents...Then, under the condition statement, put the following:
RP.getParameterValue('sysparm_userpref_module') == 'ID for module' if it matches, it'll show...