Home
|
Forums
|
Contact
|
Search
|
Syndication
[login]
[create account]
Sunday, August 17, 2025
slxdeveloper.com
Home
Search
Contact us
About slxdeveloper
Syndication
Community
Forums
(NEW!)
Newsletter Archive
Members
Your Profile
Submit Article
General
Administration
(6)
OLE DB Provider
Miscellaneous
(2)
Architect
VBScript
(9)
ActiveX Controls
(6)
How To's
(14)
.NET Extensions
(3)
External
OLE DB Provider
(12)
SLAPI (SlgxApi.dll)
SalesLogix COM
(1)
Web
ASP/ASP.NET
(2)
Web Services
Web Client
Downloads
Samples
(17)
Documentation
(7)
Utilities
(18)
Resources
SalesLogix
(3)
Programming
(1)
8/17/2025 2:30:30 PM
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 Thread
View:
Dynamic
Flat
Tree
Search:
Author
Thread: lookup prefilter based on another lookup
vaughn poulson
Posts: 28
lookup prefilter based on another lookup
Posted: 05 Feb 09 3:44 PM
I'm doing my first devlopment in the web.
I have two lookups on a smart part. One for account and the other for contact.
I need to limit the contats returned to the account selected. I've added the following C# snippet to the account lookup for the onchange Action property:
if(this.BindingSource != null)
{
Sage.Entity.Interfaces.IAccount returnAccount = lueFirmAccount.LookupResultValue as Sage.Entity.Interfaces.IAccount;
string firmAccountId = returnAccount.Id.ToString();
lueFirmContact.LookupPreFilters.Add("Contact.AccountId", firmAccountId);
}
I'm not sure if i'm setting the Lookup pre filter correctly
I also don't know how to set the conditions for the contact lookup. This is what i currently have set:
CondOperator is Equal to and no other properties are set.
Any help would be great.
[
Reply
][
Quote
]
Mike LaSpina
Posts: 116
Re: lookup prefilter based on another lookup
Posted: 09 Feb 09 3:40 PM
Assuming you're in 7.5, you should not need to write any code to do this. Instead, use seeds and bindings:
On the contact lookup, set the SeeedProperty to 'Account.Id'. Then, on the binding screen for that same lookup control, bind the SeedValue to 'MainEntity.Account.Id'.
This should filter the contact lookup to only contacts for the given account and won't require any code.
[
Reply
][
Quote
]
vaughn poulson
Posts: 28
Re: lookup prefilter based on another lookup
Posted: 10 Feb 09 3:38 PM
Mike,
That definatly helps. I'm still having some troupble with it. The first time i open entity and select an account the contact lookup is still showing all the contacts. But if i navigate to the next entity the contact lookup works perfectly. Here is the code i have in the onload for the smart part:
Sage.Entity.Interfaces.IAccount selAccount = lkuAccount.LookupResultValue as Sage.Entity.Interfaces.IAccount;
if(selAccount != null)
{
lkuContact.SeedValue = selAccount.Id.ToString();
lkuContact.OverrideSeedOnSearch = false;
}
else
{
lkuContact.SeedValue = null;
lkuContact.OverrideSeedOnSearch = true;
}
And for this event i have set the repaint to true.
[
Reply
][
Quote
]
Mike LaSpina
Posts: 116
Re: lookup prefilter based on another lookup
Posted: 10 Feb 09 4:27 PM
I'd recommend getting rid of the code altogether and using bindings to manage the seed values. Click on the 'DataBindings' property for your contact lookup and bind the 'SeedValue' to your account ID (most likely MainEntity.Account.Id). Be sure to set the 'SeedProperty' property of the lookup to 'Account.Id' as well.
[
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
|
page cache (param): 8/17/2025 3:17:05 PM