Solved

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

  • 20 January 2022
  • 5 replies
  • 41 views

Userlevel 4

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

icon

Best answer by Dmitrii Naumov 20 January 2022, 22:11

View original

5 replies

Userlevel 5
Badge +1

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

So, there is no Action object anymore. 

What you should override instead is CreateShipment

Userlevel 4

@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.

Userlevel 5
Badge +1

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. 

Userlevel 4

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.

 

Userlevel 4

Got it to work.  :-)  Thanks @dnaumov 

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 — 2020  Acumatica, Inc. All rights reserved