Skip to main content
Answer

How to override the Print Invoice button in SO Invoices

  • October 2, 2024
  • 1 reply
  • 75 views

Forum|alt.badge.img

Hello all,

How can I override the Print Invoice button in the SO Invoices (SO303000) screen. i tried to override the Mailing ID = SO Invoice for both Customer & Sales Order Pref  with the report ID that I want to override but it is not getting overridden.

How can I get this done?

Best answer by DipakNilkanth

Hi @Harry,

For overriding PrintInvoice Action on SOInvoiceEntry, You can use below code snippet.

 public class SOInvoiceEntry_Extension : PXGraphExtension<PX.Objects.SO.SOInvoiceEntry>
{
#region Event Handlers
public delegate IEnumerable PrintInvoiceDelegate(PXAdapter adapter, String reportID);
[PXOverride]
public IEnumerable PrintInvoice(PXAdapter adapter, String reportID, PrintInvoiceDelegate baseMethod)
{
return baseMethod(adapter,reportID);
}

Hope, it helps!

1 reply

DipakNilkanth
Pro III
Forum|alt.badge.img+13
  • Pro III
  • Answer
  • October 2, 2024

Hi @Harry,

For overriding PrintInvoice Action on SOInvoiceEntry, You can use below code snippet.

 public class SOInvoiceEntry_Extension : PXGraphExtension<PX.Objects.SO.SOInvoiceEntry>
{
#region Event Handlers
public delegate IEnumerable PrintInvoiceDelegate(PXAdapter adapter, String reportID);
[PXOverride]
public IEnumerable PrintInvoice(PXAdapter adapter, String reportID, PrintInvoiceDelegate baseMethod)
{
return baseMethod(adapter,reportID);
}

Hope, it helps!