Skip to main content

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.

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


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


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


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();
         }
}


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();
}
}

 

 

 

 


Thank you Naveen. It works.


@girik06  Great 🙂 Thanks for sharing the update


Reply