ActiveViewName method not fetching ViewName in buscomp PreQuery event
I have written the below smal piece of code in the Action BC PreQuery event,
function BusComp_PreQuery ()
{
var sView = TheApplication().ActiveViewName();
if(sView == "All Inbound Item List View")
this.SetSortSpec("Updated(DESCENDING)");
return (ContinueOperation);
}
This code is not working i.e. ActiveViewName() is returning null when the view is invoked from SiteMap.
SiteMap -> Communications -> All Communications
This script works fine when the view is loaded and then I do Query and Go in the List applet.
Can someone let me know the whether ActiveViewName() method returns view name when view is instantiated from SiteMap.
Regards,