How to get the view name of the form by using script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-15-2014 03:41 AM
Hi All,
For change table we are having two different views.So I want to get the view name by using script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-26-2014 02:10 AM
Excellent,it is working.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2015 03:02 AM
Hi Kris,
Its working fine on list view but when I am taking the report by setting the query like 'change type = 'itcc'' then it is not showing any records. If I remove the filter then it is showing the records of 'change type ='Infrastructure' only.
Below is the before query Business rule i am using
var transaction = GlideTransaction.get();
var ViewNameIs = transaction.getRequestParameter("sysparm_view");
if(ViewNameIs == 'itcc_list'){
current.addQuery("u_change_type", "ITCC");
}
else{
current.addQuery("u_change_type", "Infrastructure");
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-13-2015 02:58 AM
Hi All,
Any idea on this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-16-2014 09:01 AM
document.getElementById('sysparm_view').value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2015 07:36 AM
The DOM does not contain any element with id=sysparm_view