fiogf49gjkf0d I am trying to be able to bind an activity to a new entity "Project". I've added the lookup to ActivityDetails.ascx. A test shows the lookup functioning properly, however, when I try to add the binding to ActivityDetails.ascx.cs ( bs.Bindings.Add(new WebEntityBinding("lueProject", ProjectID, "LookupResultValue")) the form crashes out with an error "The name 'ProjectID' does not exist in the current contex."
I've added the field ProjectID to the Activities entity.
Does anyone have any clue why this isn't working?
bs.Bindings.Add(new WebEntityBinding("ContactId", ContactId, "LookupResultValue")); bs.Bindings.Add(new WebEntityBinding("lueProject", ProjectID, "LookupResultValue")); //WDB 03/29/2012 bs.Bindings.Add(new WebEntityBinding("AccountId", ContactId, "SeedValue")); bs.Bindings.Add(new WebEntityBinding("OpportunityId", OpportunityId, "LookupResultValue"));
<div class=" lbl alignleft"><br /> <asp:Label ID="lueProject_lbl" AssociatedControlID="lueProject" runat="server" Text="Project:" ></asp:Label> </div> <div class="textcontrol lookup" > <SalesLogix:LookupControl runat="server" ID="lueProject" LookupEntityName="Project" LookupEntityTypeName="Sage.Entity.Interfaces.IGDCGProject, Sage.Entity.Interfaces, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" LookupBindingMode="String" AllowClearingResult="true" > <LookupProperties> <SalesLogix:LookupProperty PropertyHeader="Account Name" PropertyName="Account.AccountName" PropertyType="System.String" PropertyFormat="None" PropertyFormatString="" UseAsResult="True" ExcludeFromFilters="False"></SalesLogix:LookupProperty> <SalesLogix:LookupProperty PropertyHeader="Description" PropertyName="Description" PropertyType="System.String" PropertyFormat="None" PropertyFormatString="" UseAsResult="True" ExcludeFromFilters="False"></SalesLogix:LookupProperty> <SalesLogix:LookupProperty PropertyHeader="Division" PropertyName="Division" PropertyType="System.String" PropertyFormat="None" PropertyFormatString="" UseAsResult="True" ExcludeFromFilters="False"></SalesLogix:LookupProperty> <SalesLogix:LookupProperty PropertyHeader="Job Number" PropertyName="JobNumber" PropertyType="System.String" PropertyFormat="None" PropertyFormatString="" UseAsResult="True" ExcludeFromFilters="False"></SalesLogix:LookupProperty> </LookupProperties> <LookupPreFilters> </LookupPreFilters> </SalesLogix:LookupControl> </div>
|