DropDownList–SalesLogix Lookup Issue

It seems that after a lookup that is in DropDownMode is initialized changes to the LookupPrefilters have no effect. The items are cached and a check is done to not reload the list if any items exist in the list. Since the list is cached a new call to LoadItems will not be made.

Luckily with a little reflection magic this can be resolved. The following code is a method that can be called that will clear the items and allow it to be correctly refreshed in case of a change to the LookupPreFilters

image

Have an excellent day

SalesLogix Web Dependency Lookups

I am working on a project where I have to do some considerable customizations around localization. Specifically the product needs to handle 4 different languages from PickLists, Groups, DependencyLookups, and more. Today I was implementing a solution around dependency lookups and could not get the lookup to change based on my language settings. What I was doing was changing the PreFilter properties to point to an extended field on my ACI table. I tried various things with no success. I decided to dig into the controls code and see if there was something that would lead me to a solution.

In the code I got my Ah Ha moment as I could see that some filter state was being stored in the HttpCache however it was never being cleared, nor was there a way on the control to invoke a clear action. Though the control did not expose an invalidate method the solution was quite simple once the issue was discovered.

Simply call

HttpContext.Current.Cache.Remove(dpeLookup.ClientId);

This will clear the filters from the cache and reload them correctly.

Mark