I am trying to make the ShippedQty readonly based on a new status I created as a custom field in the SOShipment row. I need to get the SOShipment record in the SOShipLine_RowSelected event, but the PXSelect keeps giving me an error. Please see my code below:
protected virtual void SOShipLine_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
{
SOShipLine soShipLine = (SOShipLine)e.Row;
if (soShipLine != null)
{
SOShipment soShipment = PXSelect<SOShipment,
Where<SOShipment.shipmentNbr, Equal<Required<SOShipment.shipmentNbr>>>>.Select(this, soShipLine.ShipmentNbr);
var soShipmentExt = PXCache<SOShipment>.GetExtension<SOShipmentExt>(soShipment);
if (soShipment.Status == "N" && soShipmentExt.UsrEDIStatus != "N")
{
PXUIFieldAttribute.SetEnabled<SOShipLine.shippedQty>(sender, e.Row, Base.IsImport);
}
}
I am getting the error: CS0120 An object reference is required for the non-static field, method, or property 'PXSelectBase.Select(params object[])'
Anyone have any idea why? I have used this type of select many places. I think it is having issue with the soShipLine.ShipmentNbr parameter in the Select.