Skip to main content
Answer

UNABLE TO ADD CUSTOM ACTION USING CODE IN GRAPH EXTENSION

  • May 2, 2024
  • 2 replies
  • 119 views

Forum|alt.badge.img

The below custom code is not working in SOOrderEntry graph extension when I upgraded my customization to 24R1 version, though the same code is working fine in SOInvoiceEntry graph extension in save version


I am trying to add action menu item.

 

public override void Initialize()
{
    base.Initialize();
    this.Base.action.AddMenuAction(recalculateCPPriceAction);            
}

Below is the error and screenshot

Below is my SOOrderEntry graph extension structure

 

Can anyone help me out with this issue, I am confused about its working in anothe graph extension(SOInvoiceEntry) but not working in SOOrdrEntry graph extension in the same project.

 

Thanks and Regards

SD

Best answer by DipakNilkanth

Hi @sd79,

I believe you need to replace this.Base.action.AddMenuAction to Base.action.AddMenuAction.

Hope, it helps.

2 replies

DipakNilkanth
Pro III
Forum|alt.badge.img+13

Hi @sd79,

I believe you need to replace this.Base.action.AddMenuAction to Base.action.AddMenuAction.

Hope, it helps.


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • May 2, 2024

Hi @sd79  The below code is not required. This is old version code.

If you wanted to add this actions under different category of Actions, you can simply do this from the Customization Project Editor. Please find the screenshot for reference.

 

//NOT REQUIRED

public override void Initialize()
{
    base.Initialize();
    this.Base.action.AddMenuAction(recalculateCPPriceAction);            
}