getGlideURI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-17-2012 11:23 AM
Hi all,
I am given the task to restrict IP Address table when clicking the "All" button in the related list for task_ci table. I reviewed existing codes and here's what I found:
//================================================================
// "Business Application" UI Action
// table: task_ci
var uri = action.getGlideURI();
var path = uri.getFileFromPath();
uri.set('sysparm_m2m_ref', current.getTableName());
uri.set('sysparm_stack', 'no');
uri.set('sysparm_collection_related_file', 'u_cmdb_ci_busappl');
action.setRedirectURL(uri.toString('sys_m2m_template.do'));
//================================================================
// "All" UI Action
// table: task_ci
var uri = action.getGlideURI();
var path = uri.getFileFromPath();
uri.set('sysparm_m2m_ref', current.getTableName());
uri.set('sysparm_stack', 'no');
action.setRedirectURL(uri.toString('sys_m2m_template.do'));
//================================================================
The only difference from another UI Action is this: uri.set('sysparm_collection_related_file', ''), which returns the targeted table. However, I need to do is modify the "All" UI Action yet not returning the IP Address. Unfortunately, there was not enough references in the SNC Wiki.
I am thinking like this: uri.set('sysparm_collection_related_file', 'NOT', 'cmdb_ip_address')
Please help...thank you again in advance.
Dor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2012 01:16 PM
Ho Dor,
it looks alike section "3 Creating Advanced (Dynamic) Filters" from http://wiki.servicenow.com/index.php?title=Filtering_Related_List_Relationships is your key.
Best regards,
Karsten J.