Added two grids to the Customer Locations Screen. The screens work fine up to the point where I hit save. Then it says it cannot set Location ID cannot be empty. So Location ID is not being grabbed by the data view I assume.
The Definitions of the two data views are below:
namespace LocationTab
{
public class CustomerLocationMaint_Extension : PXGraphExtension<CustomerLocationMaint>
{
#region Event Handlers
public PXSelect<InvoiceRatesDetail, Where<InvoiceRatesDetail.locationID, Equal<Current<Location.locationID>>>> InvoiceRates;
public PXSelect<SettlementDetail, Where<SettlementDetail.locationID, Equal<Current<Location.locationID>>>> InvoiceSettlement;
#endregion
}
}
For the data definition in code (table one InvoiceRatesDetail):
#region LocationID
[PXDBInt(IsKey=true)]
[PXDBDefault(typeof(Location.locationID))]
[PXParent(typeof(Select<Location, Where<Location.locationID, Equal<Current<InvoiceRatesDetail.locationID>>>>))]
[PXUIField(DisplayName = "Location ID")]
public virtual int? LocationID { get; set; }
public abstract class locationID : PX.Data.BQL.BqlInt.Field<locationID> { }
#endregion
(table two SettlementDetail):
#region LocationID
[PXDBInt(IsKey=true)]
[PXDBDefault(typeof(Location.locationID))]
[PXParent(typeof(Select<Location, Where<Location.locationID, Equal<Current<SettlementDetail.locationID>>>>))]
[PXUIField(DisplayName = "Location ID")]
public virtual int? LocationID { get; set; }
public abstract class locationID : PX.Data.BQL.BqlInt.Field<locationID> { }
#endregion
Error message on save:
Any help would be appreciated
Best answer by Fernando Amadoz
View original