Skip to main content
Question

Automate the update in process using Workflow automation in Shipment screen

  • October 4, 2024
  • 3 replies
  • 84 views

Forum|alt.badge.img+2

Is it possible to automate the update In action along with the Confirm shipment action? I am able to see there are few topics related to this. But don't have luck to complete to full process.

Please let me know if there is any chance.

3 replies

jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • October 7, 2024

Hi @ranjithduraisamy72 ,

There is no default workflow for updating and confirming a shipment in a single action. However, we can customize the process to perform both actions together, as shown below

 

public class SOShipmentEntryExtn : PXGraphExtension<SOShipmentEntry>
{
    public PXAction<SOShipment> customUpdateAndConfirm;
    
    [PXButton]
    [PXUIField(DisplayName = "Update and Confirm", MapEnableRights = PXCacheRights.Update, MapViewRights = PXCacheRights.Update)]
    protected virtual IEnumerable CustomUpdateAndConfirm(PXAdapter adapter)
    {
        // Call the Update action
        Base.Update.Press();  
        
        // Call the Confirm Shipment action
        Base.confirmShipment.Press();

        return adapter.Get();
    }
}
 


darylbowman
Captain II
Forum|alt.badge.img+15

 

However, we can customize the process to perform both actions together, as shown below

public class SOShipmentEntryExtn : PXGraphExtension<SOShipmentEntry>
{
    public PXAction<SOShipment> customUpdateAndConfirm;
    
    [PXButton]
    [PXUIField(DisplayName = "Update and Confirm", MapEnableRights = PXCacheRights.Update, MapViewRights = PXCacheRights.Update)]
    protected virtual IEnumerable CustomUpdateAndConfirm(PXAdapter adapter)
    {
        // Call the Update action
        Base.Update.Press();  
        
        // Call the Confirm Shipment action
        Base.confirmShipment.Press();

        return adapter.Get();
    }
}

Because Base.UpdateIN.Press() will start a PXLongOperation, it is very likely that you will receive an error that another process has updated the record if you call Base.confirmShipment.Press() immediately after.


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • December 24, 2024

Hi ​@ranjithduraisamy72 were you able to find a solution? Thank you!