Hi @ray20
In 20 R2, since the Automation steps are de-activated by default and NOT able to activate, Can you please add below RowSelected event and verify..
public class SOShipmentEntryExt : PXGraphExtension<SOShipmentEntry>
{
protected virtual void SOShipment_RowSelected(PXCache cache, PXRowSelectedEventArgs e, PXRowSelected InvokeBaseHandler)
{
InvokeBaseHandler?.Invoke(cache, e);
SOShipment row = e.Row as SOShipment;
if (row != null)
{
Base.Document.Cache.AllowUpdate = true;
PXUIFieldAttribute.SetEnabled<SOShipmentExt.usrTestField>(cache, row, true);
}
}
}
Hi @ray20
In 20 R2, since the Automation steps are de-activated by default and NOT able to activate, Can you please add below RowSelected event and verify..
public class SOShipmentEntryExt : PXGraphExtension<SOShipmentEntry>
{
protected virtual void SOShipment_RowSelected(PXCache cache, PXRowSelectedEventArgs e, PXRowSelected InvokeBaseHandler)
{
InvokeBaseHandler?.Invoke(cache, e);
SOShipment row = e.Row as SOShipment;
if (row != null)
{
Base.Document.Cache.AllowUpdate = true;
PXUIFieldAttribute.SetEnabled<SOShipmentExt.usrTestField>(cache, row, true);
}
}
}
Yes, code master. Thank you so much. I just did, it works.
Fantastic, you are the best.
@Naveen B
Hello, and to who are also interested
I have verified that, both the “modify in either automation steps or in workflow” and “codes in rowselect” are needed to enable the fields.
Yes @ray20 Acumatica is disabling the fields in the code level as well as Automation Steps/Workflow once the document is changed to “Completed” status
Unfortunately the same scenario didn’t worked out for me in case of SOLine DAC
I want to enable custom field in SOLine and SOShipLine DAC. Can anyone show us the directions.
Thanks
Hi @sd79 You need to enable the field from Workflows as well as you need to have the below code.
You can refer this link if you have any doubts.
public class SOShipmentEntryExt : PXGraphExtension<SOShipmentEntry>
{
protected virtual void SOShipLine_RowSelected(PXCache cache, PXRowSelectedEventArgs e, PXRowSelected InvokeBaseHandler)
{
InvokeBaseHandler?.Invoke(cache, e);
SOShipLine row = e.Row as SOShipLine;
if (row != null)
{
Base.Document.Cache.AllowUpdate = true;
Base.Transactions.Cache.AllowUpdate = true;
PXUIFieldAttribute.SetEnabled<SOShipLineExt.usrTestField>(cache, row, true);
}
}
}
public class SOOrderEntryExt : PXGraphExtension<SOOrderEntry>
{
protected virtual void SOLine_RowSelected(PXCache cache, PXRowSelectedEventArgs e, PXRowSelected InvokeBaseHandler)
{
InvokeBaseHandler?.Invoke(cache, e);
SOLine row = e.Row as SOLine;
if (row != null)
{
Base.Document.Cache.AllowUpdate = true;
Base.Transactions.Cache.AllowUpdate = true;
PXUIFieldAttribute.SetEnabled<SOLineExt.usrTestField>(cache, row, true);
}
}
}