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>
|