I am using the InvoiceEntryExt Graph extension, and have added a DAC called 'Receipts' which I have overridden with the IEnumerable method.
public PXSelect<POReceipt> Receipts;
public IEnumerable receipts()
{
List<string> receiptNbrList = new List<string>();
foreach(APTran tran in Base.Transactions.Select())
{
if(!string.IsNullOrEmpty(tran.ReceiptNbr) && !receiptNbrList.Contains(tran.ReceiptNbr))
{
receiptNbrList.Add(tran.ReceiptNbr);
}
}
object[] values = receiptNbrList.ToArray();
PXResultset<POReceipt> rcpts = PXSelect<POReceipt, Where<POReceipt.receiptNbr, In<Required<POReceipt.receiptNbr>>>>.Select(new PXGraph(), values);
return rcpts;
}
When the query executes, I am passing multiple receipt numbers into the values array, but I only get 1 receipt result every time, when I know for a fact there should be more.