Solved

Automatically refresh the Screen/Grid after processed the records in Processing screen

  • 27 November 2021
  • 7 replies
  • 986 views

Userlevel 4
Badge +1

Hi,
I created one Processing screen with List of Vendors..
After Processed selected records(3), All records(10) got vanished from the screen.
If I refresh the grid/screen, then unprocessed records(7) are showing in the screen.
How can I get unprocessed records automatically  without refresh after processing??
Thanks.

icon

Best answer by Naveen Boga 27 November 2021, 15:28

View original

7 replies

Userlevel 7
Badge +17

Hi @girik06  Actually it should not vanish the records after processing, can you please share the processing screen code here?

Userlevel 7
Badge +17

Hi @girik06  Actually it should not vanish the records after processing, can you please share the processing screen code here?

Userlevel 7
Badge +17

Hi @girik06   Actually, it should not vanish the records after processing, can you please share the processing screen code here?

Userlevel 4
Badge +1

Hi @Naveen B  below is the Code:
 


 public class VendorProcess : PXGraph<VendorProcess>
    {
   
  public PXProcessing<Vendor, Where<VendorExt.usrExpiryDt,
            Less<Current<AccessInfo.businessDate>>>> VendorProcess;
        public VendorProcess()
        {
            VendorProcess.SetProcessDelegate(delegate (List<Vendor> list)
            {
                VendorProcess(list);
            });
            
        }

        public static void VendorProcess(List<Vendor> listvalrow)
        {
            VendorMaint vegraph = PXGraph.CreateInstance<VendorMaint>();
            foreach (Vendor ven in listvalrow)
            {
                PXUpdate<Set<VendorExt.usrStatus, Required<VendorExt.usrStatus>>, Vendor,
                           Where<Vendor.bAccountID,
                           Equal<Required<Vendor.bAccountID>>>>.Update(vegraph, "RV", ven.BAccountID);

                  vegraph.Persist();

            }
            VendorProcess grp = PXGraph.CreateInstance<VendorProcess>();
            grp.VendorProcess.Cache.Clear();
            grp.VendorProcess.View.RequestRefresh();
         }
}

Userlevel 7
Badge +17

Hi @girik06  Can you please below code and check once?

  public PXCancel<Vendor> Cancel;

 

Code: 

public class VendorProcess : PXGraph<VendorProcess>
{

public PXCancel<Vendor> Cancel;
public PXProcessing<Vendor, Where<VendorExt.usrExpiryDt,
Less<Current<AccessInfo.businessDate>>>> VendorProcess;



public VendorProcess()
{
VendorProcess.SetProcessDelegate(delegate (List<Vendor> list)
{
VendorProcess(list);
});

}

public static void VendorProcess(List<Vendor> listvalrow)
{
VendorMaint vegraph = PXGraph.CreateInstance<VendorMaint>();
foreach (Vendor ven in listvalrow)
{
PXUpdate<Set<VendorExt.usrStatus, Required<VendorExt.usrStatus>>, Vendor,
Where<Vendor.bAccountID,
Equal<Required<Vendor.bAccountID>>>>.Update(vegraph, "RV", ven.BAccountID);

vegraph.Persist();

}
VendorProcess grp = PXGraph.CreateInstance<VendorProcess>();
grp.VendorProcess.Cache.Clear();
grp.VendorProcess.View.RequestRefresh();
}
}

 

 

 

 

Userlevel 4
Badge +1

Thank you Naveen. It works.

Userlevel 7
Badge +17

@girik06  Great :) Thanks for sharing the update

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