SalesLogix v8.0 “Core Web Update 04” and “Quote and Forecast” breaks Speedsearch

We recently installed the SalesLogix web update 04 into a demo system and after doing so were unable to use Speedsearch in the SalesLogix web client.  Looking into the error I was lead to the Speedsearch.aspx file’s Page_Load code.


Looking into the Page_Load, I can see the actual error was caused by the call to LoadIndexes.

Looking in the event logs on the server I found this error:

  “message”: “An item with the same key has already been added.”,

 OK so we see that a Dictionary object is having problems with a duplicate key attempting to be added.  Lets look at that LoadIndexes script.

    private void LoadIndexes()
        if ((_Indexes == null) || (_Indexes.Count == 0))
            IRepository<IIndexDefinition> rep = EntityFactory.GetRepository<IIndexDefinition>();
            IQueryable qry = (IQueryable)rep;
            IExpressionFactory ef = qry.GetExpressionFactory();
            ICriteria crit = qry.CreateCriteria();
            IExpression accessExp = ef.Le(“UserAccess”, _UserType);
            crit.Add(ef.And(accessExp, ef.Eq(“Enabled”, true)));
            IList<IIndexDefinition> tempIndexes = crit.List<IIndexDefinition>();

            Assembly interfaceAsm = Assembly.GetAssembly(typeof(IIndexDefinition));
            Type[] types = interfaceAsm.GetTypes();
            _TablesEntities = new Dictionary<string, Type>();
            foreach (Type entity in types)
                AttributeCollection attrs = TypeDescriptor.GetAttributes(entity);
                foreach (Attribute attr in attrs)
                    ActiveRecordAttribute activeRecord = attr as ActiveRecordAttribute;
                    if (activeRecord != null)
                        _TablesEntities.Add(activeRecord.Table.ToUpper(), entity);

The line 

Type[] types = interfaceAsm.GetTypes()

Is creating an array of every interface object in the system.  They then loop through each interface and add the underlying table the entity is bound to the index (which is where the problem is).  Adding an debugging output I found that CUSTOMSETTING is the duplicate key being added.

Sure enough looking into the Web Update 04 manifest I see it is being added:


But the problem is that results in a duplicate entity in the entity model:


So where did the CustomSettings come from?  The Quota and Forecasting manifest!


Hence the duplicate key in the dictionary!

I removed the CustomSettings and kept the CustomSetting entity. 

Doing the reverse does not allow SLX to open.

However deleting the CustomSettings entity breaks the Quota and Forecast.

Here are the conflicts that must be resolved:


The only ones that need to be fixes are:

  1. The FinancialSettings quickform (the code throughout out the form)
  2. The FiscalAPI.cs file, all of the references in the code.

SalesLogix needs to fix this one pronto obviously.

Want content like this delivered to your inbox? Sign up for our newsletter!

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 *