Question

Screen refresh on ID change

  • 22 February 2022
  • 0 replies
  • 43 views

Userlevel 3
Badge

Trying to add a “Change ID” button to the Workcenter Maintenance form using this guide: How to use the Change ID Action in Acumatica - Acumatica Cloud ERP. I’ve gotten the code working and am able to change the ID but after typing the new ID in and clicking ok, the existing shift disappears from the screen because the WcID is tied to the shift and I have to recreate the shift.

Is there a way to make the shift WcID change so that it doesn’t disappear?

 

I checked the DB and the old shift is still in there with the old WC code:

Old WC Shift

using PX.Data;

namespace PX.Objects.AM
{
    // Acuminator disable once PX1016 ExtensionDoesNotDeclareIsActiveMethod extension should be constantly active
    public class WCMaint_Extension : PXGraphExtension<WCMaint>
    {
        [PXButton]
        public PXChangeID<AMWC, AMWC.wcID> ChangeID;
        
    }

}

 

<px:PXSmartPanel runat="server" ID="pnlChangeID" Caption="Specify New ID" CaptionVisible="True" DesignView="Hidden" LoadOnDemand="True"
    Key="ChangeIDDialog" AutoCallBack-Enabled="False" AutoCallBack-Target="formChangeID" AutoCallBack-Command="Refresh" CreateOnDemand="False" 
    AutoCallBack-Behavior-CommitChanges="True" AutoCallBack-Behavior-PostData="Page" AcceptButtonID="btnOK">
        <px:PXFormView runat="server" ID="formChangeID" Width="100%" CaptionVisible="False" DataSourceID="ds" DataMember="ChangeIDDialog">
          <Template>
            <px:PXLayoutRule runat="server" ID="rlAcctCD" StartColumn="True" LabelsWidth="S" ControlSize="XM" />
            <px:PXTextEdit runat="server" DataField="CD" ID="edAcctCD" />
          </Template>
        </px:PXFormView>
        <px:PXPanel runat="server" ID="pnlChangeIDButton" SkinID="Buttons">
          <px:PXButton runat="server" ID="btnOK" Text="OK" DialogResult="OK">
            <AutoCallBack Target="formChangeID" Command="Save" /></px:PXButton>
          <px:PXButton runat="server" ID="btnCancel" DialogResult="Cancel" Text="Cancel" />
        </px:PXPanel>
    </px:PXSmartPanel>


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 — 2022  Acumatica, Inc. All rights reserved