Hi,
I have created few custom fields on Invoices form and allowed them to update through the code. then added them to the workflow to set them as editable at any time.
below is the DAC field and the extended graph code.
// DAC field
public class ARRegisterExt : PXCacheExtension<PX.Objects.AR.ARRegister>
{
#region UsrBillStatus
[PXDBString(4)]
[PXUIField(DisplayName = "Bill Status", Enabled = true)]
[PXStringList(
new string[]
{
BillStatus.WorkInProgress,
BillStatus.BillAtProduction,
BillStatus.BillAtSubcontract,
BillStatus.ForwardToFinance,
BillStatus.PaymentReceived,
BillStatus.ReturnToProduction,
BillStatus.JobDeleted
},
new string[]
{
TextValues.WorkInProgress,
TextValues.BillAtProduction,
TextValues.BillAtSubcontract,
TextValues.ForwardToFinance,
TextValues.PaymentReceived,
TextValues.ReturnToProduction,
TextValues.JobDeleted
}
)]
public virtual string UsrBillStatus { get; set; }
public abstract class usrBillStatus : PX.Data.BQL.BqlDecimal.Field<usrBillStatus> { }
#endregion
}
// Event handler to allow update
public class SOInvoiceEntry_Extension : PXGraphExtension<PX.Objects.SO.SOInvoiceEntry>
{
#region Event Handlers
protected virtual void ARRegister_RowSelected(PXCache cache, PXRowSelectedEventArgs e, PXRowSelected InvokeBaseHandler)
{
// Invoke base handler
InvokeBaseHandler?.Invoke(cache, e);
ARRegister row = e.Row as ARRegister;
if (row != null)
{
// to cache allows updates
cache.AllowUpdate = true;
// Enable the custom fields
PXUIFieldAttribute.SetEnabled<ARRegisterExt.usrBillStatus>(cache, row, true);
}
}
#endregion
}
then added them to the workflow by extending the DEFAULT Workflow.


But these fields cannot be edit on closed Invoices.

What am I missing here. any help would be greatly appreciated.
Regards.