Saleslogix 8.1 Web Access Tab Throws Null Reference Error

 I recently had a client experiencing a problem access the Contact’s Web Access tab.  Whenever the tab was opened, an error would be thrown.  The underlying error in the event log looked like this:

 2014-06-11 15:07:24,400 [38] ERROR SlxClient.ContactPage – Saleslogix Web Client unhandled exception during async postback [Saleslogix Error Id=SLX9F9FFFDDFBC8305C]
{
  “slxErrorId”: “SLX9F9FFFDDFBC8305C”,
  “mitigation”: “AjaxErrorResponse (576)”,
  “date”: “2014-06-11T15:07:24”,
  “utc”: “2014-06-11T22:07:24”,
  “message”: “Object reference not set to an instance of an object.”,
  “source”: “ASP.AccountDetails, App_Web_tf5rhnry, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null”,
  “type”: “System.NullReferenceException”,
  “stackTrace”: ”   at ASP.AccountDetails.quickformload0(Object sender, EventArgs e)rn   at ASP.AccountDetails.OnFormBound()rn   at Sage.Platform.WebPortal.SmartParts.EntityBoundSmartPart.OnPreRender(EventArgs e)rn   at System.Web.UI.Control.PreRenderRecursiveInternal()rn   at System.Web.UI.Control.PreRenderRecursiveInternal()rn   at System.Web.UI.Control.PreRenderRecursiveInternal()rn   at System.Web.UI.Control.PreRenderRecursiveInternal()rn   at System.Web.UI.Control.PreRenderRecursiveInternal()rn   at System.Web.UI.Control.PreRenderRecursiveInternal()rn   at System.Web.UI.Control.PreRenderRecursiveInternal()rn   at System.Web.UI.Control.PreRenderRecursiveInternal()rn   at System.Web.UI.Control.PreRenderRecursiveInternal()rn   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)”,
  “targetSite”: “Void quickformload0(System.Object, System.EventArgs)”,

Never mind that the error references the AccountDetails.  The Web Access custom smart part incorrectly defines itself as Account Detail.

The real problem turned out to be a deprecated call to the  userOptions service.  This service is used to access the SLXWEBUSERINFO table and read the data from there to determine if the web access checkbox on the Web Access tab should be checked or not.

This call is made within the quickformload0 method of the WebAccess.ascx

 Prior to 8.1 this was how the call was made:

        WebUserOptionsService userWebOptions = ApplicationContext.Current.Services.Get<IUserOptionsService>() as WebUserOptionsService;                    
        strOption = userWebOptions.GetPlatformOption(“CONTEXT:webticketcust”, “”, false, “n”, “”, EntityContext.EntityID.ToString());      

       
This code, if left in place returns a null reference expception.  Instead the correct new 8.1 code is:

        var userOptions = ApplicationContext.Current.Services.Get<IUserOptionsService>(true);
        strOption = userOptions.GetPlatformOption(“CONTEXT:webticketcust”, “”, false, “n”, “”, EntityContext.EntityID.ToString());

ABOUT THE AUTHOR

Kris Halsrud

Kris Halsrud is a Senior Analyst / Developer for Customer FX Corporation.

Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe To Our Newsletter

Join our mailing list to receive the latest Infor CRM (Saleslogix) and Creatio (bpm'online) news and product updates!

You have Successfully Subscribed!