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-15-2014 04:47 AM
Hi MD,
on a client script just do this
var x = window.location; //this will give you the whole url , now you can read the parameters
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-15-2014 06:35 AM
I want to add query by using Business rule for two different views.See my code which I pasted above
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-15-2014 06:53 AM
Please paste the value you are getting in current.getEncodedQuery()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-15-2014 07:01 AM
ORDERBYDESCnumber
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-15-2014 07:09 AM
Run this
if (current.getEncodedQuery().indexOf('sys_id')== -1)
{
gs.addInfoMessage("1");
if (current.getEncodedQuery().indexOf('sys_id=') != 0)
{gs.addInfoMessage("2");
if(view.startsWith("default"))
{gs.addInfoMessage("3");
current.addQuery("u_change_type", "Infrastructure");
}
else if(view.startsWith("itcc"))
{gs.addInfoMessage("4");
current.addQuery("u_change_type", "itcc");
}
}
}
and tell me what all messages did you get.