I need to set SONbr to only transfer Screen(IN304000) warehouse equal to sales Order screen(SO301000) warehouse(siteID).
errors in : if (sOLine.siteID == row.siteID)
this is my code:
protected void INTran_RowSelected(PXCache cache, PXRowSelectedEventArgs e)
{
//Row selected for UsrSONbr
var row = (INTran)e.Row;
if (row == null) return;
SOLine sOLine = new PXSelect<SOLine, Where<SOLineExt.usrTransferNbr,
Equal<Required<SOLineExt.usrTransferNbr>>,
And<SOLine.inventoryID, Equal<Required<SOLine.inventoryID>>>>>
(Base).Select(row.RefNbr, row.InventoryID);
if (sOLine != null)
//if (typeof(SOLine.siteID) == typeof(INSite.siteID))
if (sOLine.siteID == row.siteID)
{
{
INTranExt iNTranExt = PXCache<INTran>.GetExtension<INTranExt>(row);
iNTranExt.UsrSONbr = sOLine.OrderNbr;
cache.SetValueExt<INTranExt.usrSONbr>(row, iNTranExt.UsrSONbr);
}
}
}