I added custom column in Sales Price Worksheet.
I need to fetch that value from sales order.
I am able to join and check date I wants to filter by inventory id as well.
protected virtual void _(Events.FieldUpdated<SOLine, SOLine.inventoryID> e)
{
if (e.Row == null || e.Row.InventoryID == null) return;
ARPriceWorksheet objSalesprice = PXSelectJoin<ARPriceWorksheet,
InnerJoin<ARPriceWorksheetDetail, On<ARPriceWorksheet.refNbr, Equal<ARPriceWorksheetDetail.refNbr>>>,
Where2<Where<ARPriceWorksheet.effectiveDate, LessEqual<Required<ARPriceWorksheet.effectiveDate>>,
And<ARPriceWorksheet.expirationDate, GreaterEqual<Required<ARPriceWorksheet.expirationDate>>>>,
Or2<Where<ARPriceWorksheet.effectiveDate, LessEqual<Required<ARPriceWorksheet.effectiveDate>>, And<ARPriceWorksheet.expirationDate, IsNull>>,
Or<Where<ARPriceWorksheet.expirationDate, GreaterEqual<Required<ARPriceWorksheet.expirationDate>>, And<ARPriceWorksheet.effectiveDate, IsNull,
Or<ARPriceWorksheet.effectiveDate, IsNull, And<ARPriceWorksheet.expirationDate, IsNull>>>>>>>,
OrderBy<Desc<ARPriceWorksheet.lastModifiedDateTime>>>.Select(this.Base, e.Row.InventoryID, orderDate, orderDate, orderDate, orderDate);
}
I wants to put where condition on InventoryID as well.