Acumatica 释放ARInvoice后,如何在AR301000报头上启用自定义字段?

Acumatica 释放ARInvoice后,如何在AR301000报头上启用自定义字段?,acumatica,acumatica-kb,Acumatica,Acumatica Kb,一些用户字段被添加到ARInvoice输入屏幕(AR301000)的顶层表单中。用户希望在发票发布后修改特定的用户文本字段-实现此目的的最佳方式是什么?对于ARInvoice输入屏幕,特定于顶级表单的所有UI表示逻辑仅在ARInvoice输入BLC中实现: public class ARInvoiceEntry : ARDataEntryGraph<ARInvoiceEntry, ARInvoice>, PXImportAttribute.IPXPrepareItems {

一些用户字段被添加到ARInvoice输入屏幕(AR301000)的顶层表单中。用户希望在发票发布后修改特定的用户文本字段-实现此目的的最佳方式是什么?

对于ARInvoice输入屏幕,特定于顶级表单的所有UI表示逻辑仅在ARInvoice输入BLC中实现:

public class ARInvoiceEntry : ARDataEntryGraph<ARInvoiceEntry, ARInvoice>, PXImportAttribute.IPXPrepareItems
{
    ...
    protected virtual void ARInvoice_RowSelected(PXCache cache, PXRowSelectedEventArgs e)
    {
        ARInvoice doc = e.Row as ARInvoice;
        if (doc == null) return;
        ...
        bool shouldDisable = doc.Released == true
                            || doc.Voided == true
                            || doc.DocType == ARDocType.SmallCreditWO
                            || doc.PendingPPD == true
                            || doc.DocType == ARDocType.FinCharge && !IsProcessingMode && cache.GetStatus(doc) == PXEntryStatus.Inserted;

        if (shouldDisable)
        {
            bool isUnreleasedWO = doc.Released != true && doc.DocType == ARDocType.SmallCreditWO;
            bool isUnreleasedPPD = doc.Released != true && doc.PendingPPD == true;

            PXUIFieldAttribute.SetEnabled(cache, doc, false);
            PXUIFieldAttribute.SetEnabled<ARInvoice.dueDate>(cache, doc, (doc.DocType != ARDocType.CreditMemo && doc.DocType != ARDocType.SmallCreditWO && doc.DocType != ARDocType.FinCharge) && doc.OpenDoc == true && doc.PendingPPD != true);
            PXUIFieldAttribute.SetEnabled<ARInvoice.discDate>(cache, doc, (doc.DocType != ARDocType.CreditMemo && doc.DocType != ARDocType.SmallCreditWO && doc.DocType != ARDocType.FinCharge) && doc.OpenDoc == true && doc.PendingPPD != true);
            PXUIFieldAttribute.SetEnabled<ARInvoice.emailed>(cache, doc, true);
            cache.AllowDelete = isUnreleasedWO || isUnreleasedPPD;
            cache.AllowUpdate = true;
            Transactions.Cache.AllowDelete = false;
            Transactions.Cache.AllowUpdate = false;
            Transactions.Cache.AllowInsert = false;

            ..
        }
        else
        {
            ...
        }
        ...
    }
    ...
}
公共类:ArdAtentryGraph

public class ARInvoiceEntryExt : PXGraphExtension<ARInvoiceEntry>
{
    public void ARInvoice_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
    {
        ARInvoice doc = e.Row as ARInvoice;
        if (doc == null) return;

        bool shouldDisable = doc.Released == true || doc.Voided == true || 
            doc.DocType == ARDocType.SmallCreditWO || doc.PendingPPD == true || doc.DocType == ARDocType.FinCharge 
            && !Base.IsProcessingMode && sender.GetStatus(doc) == PXEntryStatus.Inserted;

        if (shouldDisable)
        {
            PXUIFieldAttribute.SetEnabled<ARInvoiceExt.usrCustomTextField>(sender, doc, true);
        }
    }
}