I am overriding the Process Shipments screen by adding a custom filter.
For testing, I created a “Five” class and if I put Five instead of @P.AsInt, it works great.
In the PXSelectBase command, I am able to put @P.AsInt in the statement, but I don’t know how to pass in my value. How do I pass in the value to the @P?
This is the “Five” class which returns an integer 5.
public class Five : PX.Data.BQL.BqlInt.Constant<Five>
{
public Five() : base(ICSConstants.Five)
{
}
}
This is the command I am overriding
cmd = new
SelectFrom<SOShipment>.
InnerJoin<INSite>.On<SOShipment.FK.Site>.
InnerJoin<Customer>.On<SOShipment.customerID.IsEqual<Customer.bAccountID>>.SingleTableOnly.
LeftJoin<Carrier>.On<SOShipment.FK.Carrier>.
Where<
SOShipment.confirmed.IsEqual<True>.
And<Match<Customer, AccessInfo.userName.FromCurrent>>.
And<Match<INSite, AccessInfo.userName.FromCurrent>>.
And<Exists<
SelectFrom<SOOrderShipment>.
Where<
SOOrderShipment.shipmentNbr.IsEqual<SOShipment.shipmentNbr>.
And<SOOrderShipment.shipmentType.IsEqual<SOShipment.shipmentType>>.
And<SOOrderShipment.invoiceNbr.IsNull>.
And<SOOrderShipment.createARDoc.IsEqual<True>>.
And<SOOrderShipment.shipmentQty.IsLess<@P.AsInt>>>>>>.
View(Base);
If I try to use View.Select(Base, 5) it won’t compile.
Best answer by Naveen Boga
View original