// 1 AP priceDiscAdmTrans = this.priceDiscAdmTransSiteWise(#Site1, inventTable); inventDim = inventDim::find(priceDiscAdmTrans.InventDimId); if (priceDiscAdmTrans.RecId) { this.RLPAP = priceDiscAdmTrans.OABRLP; this.InventSiteAP = inventDim.InventSiteId; this.PricePerPcsAP = priceDiscAdmTrans.Amount; this.CreatedDateAP = priceDiscAdmTrans.FromDate; }
here pricediscadmtrans is being called by function , here debugger is not going inside if condition
public PriceDiscAdmTrans priceDiscAdmTransSiteWise(InventSiteId _inventSiteId, InventTable inventTable)// Inventdim inventdim) { PriceDiscAdmTrans priceDiscAdmTrans; InventDIm inventDim; select firstonly inventDim where inventDim.InventSiteId == _inventSiteId; select firstonly priceDiscAdmTrans where priceDiscAdmTrans.ItemCode == PriceDiscProductCodeType::Table && priceDiscAdmTrans.ItemRelation == inventTable.ItemId && priceDiscAdmTrans.InventDimId == inventDim.inventDimId && (priceDiscAdmTrans.FromDate <= today() && (priceDiscAdmTrans.ToDate == dateNull() || priceDiscAdmTrans.Todate >= today())); // join inventDIm //where inventDIm.inventDimId == priceDiscAdmTrans.InventDimId && // inventDIm.inventsiteid == _inventSiteId; return priceDiscAdmTrans; }
here pricediscadmtrans is returning no data
Hi sachin mittal,
Date range you have added in the select statement for PriceDiscAdmTrans table is confusing.
Can you tell me the data range where you want to get the data for?
Also the 1st select statement you have written in InventDim returns a value?
You need to debug the code and find out which lines in where condition causing them to return priceDiscAdmTrans as empty.
Just comment out the lines on the where condition one by one and check whether its returning a buffer after commenting.
Thanks,
Girish S.
André Arnaud de Cal...
292,031
Super User 2025 Season 1
Martin Dráb
230,868
Most Valuable Professional
nmaenpaa
101,156