Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Sunday, June 29, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Web Forums - SalesLogix Web Platform & Application Architect
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Web Platform & Application Architect | New ThreadView:  Search:  
 Author  Thread: Dynamically Filtering Saleslogix Lookup in SLX web 7.5.3
mark
Posts: 70
 
Dynamically Filtering Saleslogix Lookup in SLX web 7.5.3Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Mar 11 5:56 AM
fiogf49gjkf0d

Hi


I am having requirement where i need to restrict account lookup on add assocation form so that i need to return only broker type of accounts for one condition and all accounts for another condition


So i have written my code below


(if (my conition succeded))


{



luToIDText.LookupPreFilters.Add(


"Type", "Broker");


 


 }


i have written this code on form bound page addeditaccountasociation.ascx.cs.But it is not working .


 


When i give the same filter in static mode (like below) i am able to see the filtered accounts



 



<SalesLogix:LookupPreFilter PropertyName = "Type" PropertyType = "System.String" OperatorCode = "=" FilterValue = "Broker">




 




</SalesLogix:LookupPreFilter>



 



 




 



 


but i want dynamically filtering lookup lease Help


 


Mark


 


 


 


 


 

[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Dynamically Filtering Saleslogix Lookup in SLX web 7.5.3Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Mar 11 7:01 AM
fiogf49gjkf0d

I have ran into the same situation in the past.


Basically, once you apply a condition, even if it is programatically, it won't revert back until the site is restarted....


 


Now, here is a potential solution, thiking out of the box:


  On your form, place 2 Lookup Controls, one with the Condition and one without the Condition.


  Use your Code to dynamically filter which Control is being displayed on the Screen.


 


  Off course, this also means that one control would probably be unbound, but you could always have code on the Opening of the Form and on the Closing of the Form to sync the values.


 


e.g.


  OnLoad


    myLookupWithConds.LookupResultValue = myLookup.LookupResultValue;


 


  On Save ( or on myLookupWithConds On Lookup Value Change event):


    myLookup.LookupResultValue = myLookupWithConds.LookupResultValue;


 


  On your Code:


  bool useFiltering = MyLogic();


  myLookup.Visible = !useFiltering;


  myLookupWithConds.Visible = !useFiltering;

[Reply][Quote]
mark
Posts: 70
 
Re: Dynamically Filtering Saleslogix Lookup in SLX web 7.5.3Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Mar 11 7:17 AM
fiogf49gjkf0d

Hi Raul,


Are you suggesting to have two controls one with filter and one without filter and make them visible and invisible based on my conditions or if we restart the site the dynamic filtering will work


 


mark


 

[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Dynamically Filtering Saleslogix Lookup in SLX web 7.5.3Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Mar 11 7:34 AM
fiogf49gjkf0d

I suggest you use the Hidden Control Approach.


 


Restarting IIS will fix the problem, but then the next time you set filtering it will again keep the filter, I was just mentioning that restarting IIS cleared the condition only temporarily, but this off course is not a valid approach for a Production site.

[Reply][Quote]
Mike LaSpina
Posts: 116
 
Re: Dynamically Filtering Saleslogix Lookup in SLX web 7.5.3Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Mar 11 6:39 PM
fiogf49gjkf0d

Mark,


   The followng code should work.  Note the presense of the single quotes - these are not always needed - it depends on the type of column you're filtering on.


 


lueMyLookup.LookupPreFilters.Clear();
Sage.SalesLogix.HighLevelTypes.LookupPreFilter filter = new Sage.SalesLogix.HighLevelTypes.LookupPreFilter();
filter.LookupEntityName = "SomeEntity";
filter.PropertyName = "SomeProperty";
filter.CondOperator = "Equal";
filter.PropertyType = "System.String";
filter.FilterValue = "'" + "Some Value" + "'";
lueMyLookup.LookupPreFilters.Add(filter);

[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 6/29/2025 4:48:24 AM