Hello all,
I have tried to modify the current workflow as:
![](https://uploads-us-west-2.insided.com/acumatica-en/attachment/b25bd5de-9dd0-4b73-9251-771c4c0dcfd0.png)
But still when the PO is in Open status. the field (Time Only Value) is still disabled.
![](https://uploads-us-west-2.insided.com/acumatica-en/attachment/5a216f3e-31c1-4df6-9a80-3617dca2a5f6.png)
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?
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!
https://asiablog.acumatica.com/2021/10/enable-customization-fields-when-document-is-completed.html
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!
Hello
or this?
Hi
You can use POOrderEntry graph to extend as your first screenshot.
shall I add the code between #region Event handlers?
Yes
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.