gs.getSession().getStack().top().indexOf('parameter')>0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-26-2015 12:24 AM
What is the function of gs.getSession().getStack().top().indexOf('parameter')>0.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-26-2015 12:31 AM
gs.getSession().getStack().top() will give the URL portion. (like home.do or navpage.do or incident.do?sysparm_query == ....) etc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-26-2015 12:47 AM
This is a condition in BR gs.getSession().getStack().top().indexOf('sysparm_query'). So it will check whether URL has sysparm_query. This is working fine in Base instance. But in CMS its throwing an error skipping business rule.
May be because of iframe when its checking the URL in CMS not getting sysparm_query.
Any idea why its throwing an error message.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-26-2015 01:06 AM
Hi Ashish,
Even I sense that may be due to iFrame. But even I don't know exact reason for it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-26-2015 12:46 AM
Hi Ashish,
Did this answer your question or you have any other followup question as well
.indexOf('string') will search for 'string' in the url portion and will return its position in whole URL whether it is at 10th position or 11th or so...
> 0 will check if URL contains 'string', if yes then do this and if no then do that...