Skip to main content
Solved

PO Selector for Custom Form

  • August 25, 2021
  • 1 reply
  • 115 views

Forum|alt.badge.img+2

I have created a custom form which captures inventory id and supplier, based on those selections, I need to have a PO number selector which shows the relevant PO number. How can I modify this code snippet, because at the moment it shows all PO Numbers.

 #region PONumber
        [PXDBString(50, IsUnicode = true, InputMask = "")]
        [PXUIField(DisplayName = "PO Number")]
        [PO.RefNbr(typeof(Search2<POOrder.orderNbr,
            LeftJoinSingleTable<Vendor, On<POOrder.vendorID, Equal<Vendor.bAccountID>,
            And<Match<Vendor, Current<AccessInfo.userName>>>>>,
            Where<POOrder.orderType, Equal<Optional<POOrder.orderType>>,
            And<Vendor.bAccountID, IsNotNull>>,
            OrderBy<Desc<POOrder.orderNbr>>>), Filterable = true)]
        public virtual string PONumber { get; set; }
        public abstract class pONumber : PX.Data.BQL.BqlString.Field<pONumber> { }
 #endregion

 

Best answer by Naveen Boga

Hi @TharidhiP  Below code is sample selector example, where we can load all the QT type orders. 

Hope this helps!!

 

[PXSelector(typeof(Search<SOOrder.orderNbr,Where<SOOrder.orderType,Equal<SOOrderTypeConstants.quoteOrder>>>), 
            new Type[] { typeof(SOOrder.orderNbr), typeof(SOOrder.orderDate), typeof(SOOrder.customerID), typeof(SOOrder.customerID_Customer_acctName) 
            , typeof(SOOrder.customerLocationID), typeof(SOOrder.status), typeof(SOOrder.curyOrderTotal), typeof(SOOrder.customerOrderNbr), 
                typeof(SOOrder.invoiceNbr)})]

 

View original
Did this topic help you find an answer to your question?

1 reply

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3417 replies
  • Answer
  • August 27, 2021

Hi @TharidhiP  Below code is sample selector example, where we can load all the QT type orders. 

Hope this helps!!

 

[PXSelector(typeof(Search<SOOrder.orderNbr,Where<SOOrder.orderType,Equal<SOOrderTypeConstants.quoteOrder>>>), 
            new Type[] { typeof(SOOrder.orderNbr), typeof(SOOrder.orderDate), typeof(SOOrder.customerID), typeof(SOOrder.customerID_Customer_acctName) 
            , typeof(SOOrder.customerLocationID), typeof(SOOrder.status), typeof(SOOrder.curyOrderTotal), typeof(SOOrder.customerOrderNbr), 
                typeof(SOOrder.invoiceNbr)})]

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings