The Purchase Orders screen(PO301000) has a Hold checkbox which when selected prevents the user from editing the columns from Document Details tab.
I want to edit the columns irrespective of the Hold checkbox is selected or not for the Open Orders.
The Purchase Orders screen(PO301000) has a Hold checkbox which when selected prevents the user from editing the columns from Document Details tab.
I want to edit the columns irrespective of the Hold checkbox is selected or not for the Open Orders.
You can accomplish this by using Automation Steps.
Select your Purchase Order screen, and on Step ID select "NL Open". (See below)
Then locate "PO Line" TableName with FieldName and unchecked the Disabled box. Then Save your changes.
Then let's say you want to modify the Qty field of the Grid, you can extend the POOrderEntry graph and on RowSelected event handler add your custom logic(and set enable the desired fields):
public void POLine_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
{
POLine line = (POLine)e.Row;
POOrder order = Base.Document.Current;
if (order == null || line == null || Base.IsExport) return;
if (order.Status == POOrderStatus.Open)
{
PXUIFieldAttribute.SetEnabled<POLine.orderQty>(sender, line, true);
}
}
Sample above would enable Qty field when POOrder is with Open Status (Hold unchecked). Here is another link to similar question involving Custom User Fields: How to enable a custom field on PO301000 when the PO is in Open status?