Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Sunday, June 8, 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: How to link two lookup controls
Yoyo
Posts: 7
 
How to link two lookup controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Jan 13 2:08 AM
fiogf49gjkf0d

Hello,


I have only made basic stuff show into the training and it was ok but now I am stuck on this and cannot found any detail link on this 


this must be something very basic but I cannot have it work. If you have a good article on this I would be very grateful 


I have two entities , Country and Province and I just want that when I select a country (spain for example ) I have only the spains provinces appearing into my Province control .


I created the two entities and put a relation between them with the id linked into the table . After that I use the "Filters" from wizzard indicating the name of my Country lookup but I still have the full list of my provinces appearing .


 


I tried  to use this into the accountDetails.ascx but it is never reach when loading the account details page. 


So second question : why is it not reach into the code because I put some other code into age_Load in ascx file and it was reached but not in that case .


 


 


protected void Page_Load(object sender, EventArgs e)


    {


       // Inject HQL into a lookup filter:


     string sAcctList = string.Empty;


     string sId = "" ; // account ID to search for


 


 


     // Note that the filter builds out the value as the following string "Account.Id != '<value in sAccount List variable>'"


     //  So, we need to make sure we account for our HQL being inside of single quotes - thus the unmatched single quotes


     //  around "xxx" at the beginning and "B" at the end.  The resulting HQL executed from the lookup will be:


     //   "Where Account.Id != 'xxx' AND (Contact.Account.Id = 'MY ID Here' OR Contact.Account.ParentId = 'MY ID Here') AND 'A' != 'B'"


 


     sAcctList = QFSLXLookup.LookupResultValue.ToString();


 


     Sage.SalesLogix.HighLevelTypes.LookupPreFilter actfilter = new Sage.SalesLogix.HighLevelTypes.LookupPreFilter();


     actfilter.LookupEntityName = "Sage.Entity.Interfaces.ICFCCountry";


     actfilter.FilterValue = sAcctList;


     actfilter.PropertyName = "CFCCountryId";


     actfilter.OperatorCode = "=";


     actfilter.PropertyType = "System.String";


     QFSLXLookup2.LookupPreFilters.Clear();


     QFSLXLookup2.LookupPreFilters.Add(actfilter);


 


    }


protected void QFSLXLookup_ChangeAction(object sender, EventArgs e) {


 


QFSLXLookup2.SeedProperty = "CFCCountry.Id";


 


QFSLXLookup2.SeedValue = string.Format("{0}",QFSLXLookup.LookupResultValue);


 


QFSLXLookup2.InitializeLookup = true;


}


 


 


 


thanks a lot for your responses and comments. Please tell me if you need any information.


 


 


 


 


 


 

[Reply][Quote]
Carla Tillman
Posts: 290
 
Re: How to link two lookup controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Jan 13 7:28 AM

Please clarify, you want there to be a dependent lookup control (see Area Category dependancy controls on Ticketdetails for example) and you want it on Account Details (See Account type / Sub-type for example)


But you want it to run when you load the page, not when the user chooses it?

[Reply][Quote]
Yoyo
Posts: 7
 
Re: How to link two lookup controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 11 Jan 13 4:41 AM
fiogf49gjkf0d


Yes sure and thanks for responding. Sorry for that lot of other staff to do now it is ok I have more time,  I restarted to be sure.


So I have a country lookup and Province lookup in a Project details (I created two new entities because we are going to work with lot of countries and lot of staff will be country depedent so it was easiest to have a link).


For a project I want to have a country and Province associated (this is working fine ,data is well persisted). But I want that when we choose a country that the Province Lookup show only Province belonging to this country.


So I put in on the Change action of the country lookup ( and the debugger is going into when modifying the country).


this my code :


protected void CountryLookup_ChangeAction(object sender, EventArgs e)


 


    {


        // Inject HQL into a lookup filter:


        string sAcctList = string.Empty;


       // string sId = "asdasd"; // account ID to search for


        sAcctList = CountryLookup.LookupResultValue.ToString();


 Sage.SalesLogix.HighLevelTypes.LookupPreFilter actfilter = new Sage.SalesLogix.HighLevelTypes.LookupPreFilter();


        actfilter.LookupEntityName = "Sage.Entity.Interfaces.ICFCProvince";


        actfilter.FilterValue = sAcctList;


        actfilter.PropertyName = "CFCCountryId";


        actfilter.OperatorCode = "=";


        actfilter.PropertyType = "System.String";


        ProvinceLookup.LookupPreFilters.Clear();


        ProvinceLookup.LookupPreFilters.Add(actfilter);


        ProvinceLookup.LookupExclusions = new string[] { string.Empty };


  }


I was in debug mode to see the value , I am well going into my event and  I have : 


: actfilter `= {CFCCountryId Equal to C6UJ9A0000ES}    (which is corresponding to the country ID selected).


But the Province lookp is still showing all my values (im my for this ID I should have 0 provinces).


Thanks for your help.


In case of , this my aspx code for the two lookup.


 


<SalesLogix:LookupControl runat="server" ID="CountryLookup" LookupEntityName="CFCCountry"  


AutoPostBack="true" 


LookupEntityTypeName="Sage.Entity.Interfaces.ICFCCountry, Sage.Entity.Interfaces, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" 


LookupDisplayMode="DropDownList" LookupBindingMode="String"  OnLookupResultValueChanged ="CountryLookup_ChangeAction"


DropDownDisplayProperty="NameValue"   >


<LookupProperties>


</LookupProperties>


<LookupPreFilters>


</LookupPreFilters>


</SalesLogix:LookupControl>


  </div>


 <div class=" lbl alignleft">


   <asp:Label ID="QFSLXLookup2_lbl" AssociatedControlID="ProvinceLookup" runat="server" Text=Province ></asp:Label>


 </div>   


  <div  class="textcontrol lookup"  >


<SalesLogix:LookupControl runat="server" ID="ProvinceLookup" 


LookupEntityName="CFCProvince" 


LookupEntityTypeName="Sage.Entity.Interfaces.ICFCProvince, Sage.Entity.Interfaces, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" 


LookupDisplayMode="DropDownList" LookupBindingMode="String" DropDownDisplayProperty="NameValue"  >


<LookupProperties>


</LookupProperties>


 


 


 


 


 




[Reply][Quote]
Yoyo
Posts: 7
 
Re: How to link two lookup controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Jan 13 9:48 AM

Hello,


 


bask on this problem . So thank you the Area Category dependancy controls on Ticketdetails can be a good solution .


But do you have details on how to field the different drop down list ? I check in the admin and cannot find any Dropdown list or lookup defined that can be linked to that control.


If you have any information or detailled link to that control I would appreciate (especially where to define the differents list linked together )


 

[Reply][Quote]
Carla Tillman
Posts: 290
 
Re: How to link two lookup controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Jan 13 4:38 PM
fiogf49gjkf0d

In that particular case, it is all stored in the ACI table.  A better example is the Type and SubType interaction on the OOTB AccountDetails. 


I don't have an instance up right now so I can't remember the exact call to refresh/update panels, but if you view your AccountDetails & TicketDetails (or InsertTicket) files in Visual Studio, you should be able to see the various commands used for refreshing screen data without sending a Save() command.


 


 

[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/8/2025 3:12:04 AM