Hello all,
I have tried to modify the current workflow as:

But still when the PO is in Open status. the field (Time Only Value) is still disabled.

What is it that I am missing here?
Hello all,
I have tried to modify the current workflow as:
But still when the PO is in Open status. the field (Time Only Value) is still disabled.
What is it that I am missing here?
Best answer by Nilkanth Dipak
Hi
If from workflow, it is not working, you can add below code snippet to the POOrderEntry extension graph to make it enable.
protected void POLine_RowSelected(PXCache cache, PXRowSelectedEventArgs e, PXRowSelected InvokeBaseHandler)
{
if (InvokeBaseHandler != null) InvokeBaseHandler(cache, e);
var row = (POLine)e.Row;
if (row == null) return;
var itemExt = row.GetExtension<POLineExt>();
if (itemExt == null) return;
POOrder order = PXSelect<POOrder,
Where<POOrder.orderType, Equal<Required<POOrder.orderType>>,
And<POOrder.orderNbr, Equal<Required<POOrder.orderNbr>>>>>
.Select(Base, row.OrderType, row.OrderNbr);
if (order != null && order.Status == POOrderStatus.Open)
{
PXUIFieldAttribute.SetEnabled<POLineExt.usrCustomField>(cache, row, true);
}
else
{
PXUIFieldAttribute.SetEnabled<POLineExt.usrCustomField>(cache, row, false);
}
}
Hope, it helps!
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.