Is it possible to lock slush bucket default filters in Related List?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2014 10:06 AM
Hello,
I have a related list on my Incident form. I have added a default filter in list control on that Related List. When I click on Edit.., a new window is opened with filter condition and slush bucket. Is it possible to lock the filter so that users cannot change the default filter and run it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2015 03:21 AM
Hi Pavan,
Do we have any solution to this ?
Thanks,
Sayan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2015 07:26 AM
Hi,
Skip the Client Scripts.
Create a copy of the global "Edit..." UI Action and include this line:
uri.set('sysparm_query', 'name!=NULL');
Just replace my example with an encoded query.
Simple as that
Full script example:
var uri = action.getGlideURI();
var path = uri.getFileFromPath();
uri.set('sysparm_m2m_ref', current.getTableName());
uri.set('sysparm_stack', 'no');
uri.set('sysparm_query', 'name!=NULL');
action.setRedirectURL(uri.toString('sys_m2m_template.do'));
We needed a custom UI-Action because of an issue when using a three way many-to-many relation. I added a default filter to hide the unnamed CI's which were topping the list on the go:
