tag:blogger.com,1999:blog-220453716412258117.post2472259454221097260..comments2023-06-09T08:35:04.801-07:00Comments on vreboton: DotNetNuke.Common.Globals.NavigateURL() Inside DotNetNuke SchedulerAnonymoushttp://www.blogger.com/profile/09875264748122163991noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-220453716412258117.post-56100026618803103322010-11-09T06:05:46.585-08:002010-11-09T06:05:46.585-08:00Thanks
To get your portalsettings use this:
new D...Thanks<br /><br />To get your portalsettings use this:<br />new DotNetNuke.Entities.Portals.PortalSettings(portalID)Unknownhttps://www.blogger.com/profile/11172369555364668851noreply@blogger.comtag:blogger.com,1999:blog-220453716412258117.post-25702045344310652962010-04-08T01:37:40.831-07:002010-04-08T01:37:40.831-07:00Upon viewing the source code for NavigateURL funct...Upon viewing the source code for NavigateURL function I notice that it gets the PortalSettings using PortalController.GetCurrentPortalSettings function which gets its data from HttpContext.Current.Items("PortalSettings") which we dont have if we are inside a Scheduled Task.<br /><br />So the solution is to include your portalsettings when calling the function. see below:<br /><br />This will return an error:<br />DotNetNuke.Common.Globals.NavigateURL(_lastTabId, "", "view=detail", "messageid=" & messageId.ToString)<br /><br />This one will work<br />DotNetNuke.Common.Globals.NavigateURL(_lastTabId, _portalSettings, "", "view=detail", "messageid=" & messageId.ToString)<br /><br />Now its up to you how you get your portalsettings.Anonymoushttps://www.blogger.com/profile/09875264748122163991noreply@blogger.com