Skip to main content
Answer

Action Override not firing after migrating from 2020R1 to 2021R2

  • January 20, 2022
  • 5 replies
  • 142 views

Joe Schmucker
Captain II
Forum|alt.badge.img+3

I am upgrading a project from 2020R1 to 2021R2.

In my SOOrderEntry extension, the Override on the actions is not firing.  I know the extension is firing because other code gets hit on a breakpoint.

The action I am overriding is the Create Shipment item.  This is what it looks like in the 2020R1:

 

This is what it looks like in 2021R2.  The Create Shipment button is displayed in the menu bar and it is not selected from a drop down list.

I am thinking this may be the reason why my override does not fire.  

 

This is the extension

    public class SOOrderEntrySSGExt : PXGraphExtension<SOOrderEntry>
    {
 

This ActionDelegate signature changed.  The only thing I changed to make it compile successfully is that I changed siteCD to siteID in the signature.

        #region Overridden Methods
        public delegate IEnumerable ActionDelegate(PXAdapter adapter, Nullable<Int32> actionID, Nullable<DateTime> shipDate, Nullable<Int32> siteID, String operation, String ActionDelegateName);
        [PXOverride]
        //Previous baseMethod(adapter, actionID, shipDate, siteCD, operation, ActionName);
        public IEnumerable Action(PXAdapter adapter, Nullable<Int32> actionID, Nullable<DateTime> shipDate, Nullable<Int32> siteID, String operation, String ActionName, ActionDelegate baseMethod)
        {
 

When I put a breakpoint on this it does not fire.  Does anyone have any ideas why?

With this new “menu”, do I need to be overriding some other method?

Thanks,

Joe

Best answer by Dmitrii Naumov

@joe21 in 2021 R2 the actions panel has been reworked. 

So, there is no Action object anymore. 

What you should override instead is CreateShipment

5 replies

Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Moderator
  • Answer
  • January 20, 2022

@joe21 in 2021 R2 the actions panel has been reworked. 

So, there is no Action object anymore. 

What you should override instead is CreateShipment


Joe Schmucker
Captain II
Forum|alt.badge.img+3
  • Author
  • Captain II
  • January 20, 2022

@dnaumov 

I actually am in the middle of trying to do that!  :-)  When I inspect the button it shows the Action Name as CreateShipmentIssue.  I see that method actually calls the CreateShipment method, so I wasn’t sure which one I should override.


Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Moderator
  • January 20, 2022

Both CreateShipmentReceipt and CreateShipmentReceipt invoke CreateShipment, so you should use CreateShipment.

 

However, let me ask you what your business requirement is. Because the CreateShipment action is not the single entry point for Shipment creation process from a sales order. If you do indeed only need to override the piece of functionality of Sales Order screen overriding CreateShipment works, but if you want to cover all ways a shipment can be created from a slaes order, you need to override a different method. 


Joe Schmucker
Captain II
Forum|alt.badge.img+3
  • Author
  • Captain II
  • January 20, 2022

The customer wants to override the popup that comes up asking for the ship date and the warehouse.  Also, they suppress the error if the current business date is before the ship date on the order.  That is the only thing being overridden.  

I will be forthright and say that this is someone else’s code that I’ve been asked to update for compatibility with the 2021R2.  After copying/pasting the code that was used in the previous Action override, it is compiling...so...fingers crossed.  I’m just trying now to get the signatures matched up.

 


Joe Schmucker
Captain II
Forum|alt.badge.img+3
  • Author
  • Captain II
  • January 20, 2022

Got it to work.  :-)  Thanks @dnaumov