Skip to main content
Question

Automate the update in process using Workflow automation in Shipment screen


Forum|alt.badge.img

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
  • 699 replies
  • 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+13

 

jinin wrote:

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
  • 2754 replies
  • December 24, 2024

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


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings