Post Load Method in Data Entity in D365
// post load method in data entity
public class BA_UnifonicOrderSendDataEntity extends common
{
/// <summary>
///
/// </summary>
public void postLoad()
{
SalesTable salesTable;
ARF_CapacityMasterTable masterTable;
SalesLine salesLine;
SalesQty totalOrderedQty;
super();
select SalesId, ARF_DestinationCode, ShippingDateConfirmed from salesTable where salesTable.SalesId == this.SalesId;
select sum(SalesQty) from salesLine where salesLine.SalesId == salesTable.SalesId;
totalOrderedQty = salesLine.SalesQty;
select firstonly RecId, ARF_Date from masterTable
where masterTable.ARF_Capacityid == salesTable.ARF_DestinationCode
&& masterTable.ARF_Date > salesTable.ShippingDateConfirmed
&& masterTable.ARF_CubeCapValue >= totalOrderedQty;
if(masterTable.RecId)
{
this.NextAvailableDeliveryDate = masterTable.ARF_Date;
}
}
}
Comments
Post a Comment