Solved

Make certain fields editable based on PO status

  • 21 March 2023
  • 1 reply
  • 311 views

Userlevel 1
Badge

I need to make some fields like Promise On Date, POLine Quantity editable when the Purchase Order is on the specific Purchase Order status is Open.

How can I achieve this ??

Thanks

icon

Best answer by Vignesh Ponnusamy 21 March 2023, 21:45

View original

1 reply

Userlevel 7
Badge +4

Hi @tanuj81,

You can try the following step to enable the field when the document is in Open status.

  • For this example, I extended the RO workflow to enable the fields for the Normal OrderType,

 

  • In the extended workflow add the field you need to enable and make sure Disabled checkbox is unchecked

 

  • Like below, in the graph extension enable the fields in the RowSelected event, 

    public class POOrderEntry_Extension : PXGraphExtension<PX.Objects.PO.POOrderEntry>
    {
        #region Event Handlers

        protected void POOrder_RowSelected(PXCache cache, PXRowSelectedEventArgs e, PXRowSelected baseHandler)
        {
            baseHandler?.Invoke(cache, e);
            var row = (POOrder)e.Row;
            PXUIFieldAttribute.SetEnabled<POOrder.expectedDate>(cache, row, true);

        }

        protected void POLine_RowSelected(PXCache cache, PXRowSelectedEventArgs e, PXRowSelected baseHandler)
        {
            baseHandler?.Invoke(cache, e);
            var row = (POLine)e.Row;
            PXUIFieldAttribute.SetEnabled<POLine.orderQty>(cache, row, true);
        }

        #endregion
    }

 

Please note the Purchase Order is set to Open status after being approved, so enabling these fields in the open status will allow the users update even after the purchase order is approved. Thanks,

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved