Hi,
select firstonly _sl where _sl.SalesId == custInvoiceTrans.OrigSalesId && _sl.ItemId == custInvoiceTrans.ItemId &&
_sl.InventTransId == custInvoiceTrans.InventTransId && _sl.LineNum == custInvoiceTrans.LineNum && _sl.PackingSlipId == salesParmSubLine.DocumentId;
return _sl.CIT_Smg_BlockPcs;
Note: 1. _sl = custPackingslipTrans
2. DocumentId referes to packing slip Id in table 'SalesParmSubLine'
When i debug above code it takes values for all fields except for salesParmSubLine.DocumentId and not returns any value. If I remove _sl.PackingSlipId == salesParmSubLine.DocumentId then it returns first record of the _sl (custPackingslipTrans) table.
Need help,
Thanks,
*This post is locked for comments
I have the same question (0)