Hi guys very simple question that has me baffled for quite some time now.
Why is it that when I try to reference PortalSettings.Current.ActiveTab.ModuleID or PortalSettings.ActiveTab.ModuleID I get -1 as a result?
Is there something that I am just missing or not getting?
I've been working on DNN 7 (7.2.1 > 7.3.3) service routine. And I have access to module id on the client but when I make the call to do something on the server side I can't seem to get at correct module id.
Is it simply the case that beforeSend: that.services.setModuleHeaders is not attaching correct module id?
As a work around I employed this trickery to get at module id (Service Routine C#)
var moduleId = PortalSettings.Current.ActiveTab.ChildModules.Values.Where(m => m.ModuleName == "ModuleName").Single().ModuleID;
It works just fine but "ModuleName" is a hard coded string and thats not very cool.
My second option is to pass module id as extra parameter every time which is slightly better than first solution.
Anyone with ideas or suggestions as to why PortalSettings.Current.ActiveTab.ModuleID would return -1?