I added some User Defined Fields on the Purchase Order document, however once I put the document to the open status these UDF are longer editable (same as other fields in the document header), I wonder if there is a solution for this, I need to edit these fields even when the document is in the open status.
Document User Defined Fields
This should do the work
Leave the two graph extensions in your extension so your code overrides the Workflow and Approval engine UI manipulations and of course, you need to modify the code based on the extension and udf fields you have added.
using PX.Data;
using PX.Objects.PO;
namespace HCL
{
public class HCLPOOrderEntryWF : PXGraphExtension<POOrderEntry_ApprovalWorkflow, POOrderEntry_Workflow, POOrderEntry>
{
public static bool IsActive() => true;
protected virtual void _(Events.RowSelected<POOrder> e)
{
if (e.Row == null) return;
PXUIFieldAttribute.SetEnabled<HCLPOOrderWF.usrHCLApprovalRouteID>(e.Cache, e.Row, true);
e.Cache.AllowUpdate = true; // you may need this line to be able to save but first try without this line
}
}
}
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.