Question

No able to refesh a custom view data fields on APInvoice navigation or selecting different Bill

  • 16 January 2022
  • 0 replies
  • 52 views

Userlevel 7
Badge +8

Our business needs to show the summary of Commitments (PO and Subcontracts) on top of the invoice to facilitate the approval controls. I have created a view and related DAC called “UDCTPOOrderSummary”. I have added the required fields from the view I have ctreated to the header section of the “AP Bills and Adjustments” as shown in the below snippet. 

 

 

I have added the beloe data view to the APInvoiceEntry Extension.

        public PXSelectJoin<UDCTPOOrderSummary,
InnerJoin<APTran, On<UDCTPOOrderSummary.orderType, Equal<APTran.pOOrderType>,
And<UDCTPOOrderSummary.orderNbr, Equal<APTran.pONbr>>>,
InnerJoin<APInvoice, On<APTran.tranType, Equal<APInvoice.docType>,
And<APTran.refNbr, Equal<APInvoice.refNbr>>>>>,
Where<APInvoice.docType, Equal<Current<APInvoice.docType>>,
And<APInvoice.refNbr, Equal<Current<APInvoice.refNbr>>>>> POOrderSummaryView;

 

I have added the below code to my page as well. I tried AutoCallBack on a few of the fields to see does t make any difference but didn’t.

      <px:PXLayoutRule runat="server" ID="POOrderSummaryViewRule" StartColumn="True" ControlSize="XM" LabelsWidth="SM" />
<px:PXNumberEdit runat="server" ID="edPOOrderSummaryViewCuryTotalCost" DataField="POOrderSummaryView.CuryTotalCost" Enabled="False" AutoCallBack="True" />
<px:PXNumberEdit runat="server" ID="edPOOrderSummaryViewCuryTotalTax" Enabled="False" DataField="POOrderSummaryView.CuryTotalTax" AutoCallBack="True" />
<px:PXNumberEdit runat="server" ID="edPOOrderSummaryViewCuryTotalAmt" Enabled="False" DataField="POOrderSummaryView.CuryTotalAmt" AutoCallBack="True" />
<px:PXNumberEdit runat="server" ID="edPOOrderSummaryViewCuryBilledCost" Enabled="False" DataField="POOrderSummaryView.CuryBilledCost" />
<px:PXNumberEdit runat="server" ID="edPOOrderSummaryViewCuryBilledTax" Enabled="False" DataField="POOrderSummaryView.CuryBilledTax" />
<px:PXNumberEdit runat="server" ID="edPOOrderSummaryViewCuryBilledAmt" Enabled="False" DataField="POOrderSummaryView.CuryBilledAmt" />
<px:PXNumberEdit runat="server" ID="edPOOrderSummaryViewCuryUnbilledCost" Enabled="False" DataField="POOrderSummaryView.CuryUnbilledCost" />
<px:PXNumberEdit runat="server" ID="edPOOrderSummaryViewCuryUnbilledTax" Enabled="False" DataField="POOrderSummaryView.CuryUnbilledTax" />
<px:PXNumberEdit runat="server" ID="edPOOrderSummaryViewCuryUnbilledAmt" Enabled="False" DataField="POOrderSummaryView.CuryUnbilledAmt" />

When user opens the Bills and Adjustment screen for the first time, system shows the data correctly on top of the form as expected but when user selects another bill from the list or uses navigation keys, the PO data I have added is not refereshed and always shows the values when form initiated. I tried to force the system to refresh “POOrderSummaryView.View.RequestRefresh()” on APInvoice_RowSelected Event but didn’t work either. I will appreciate help me how should I refresh the data on navigation.


0 replies

Be the first to reply!

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved