title: Acumatica - Overriding Business logic, access protected methods
body: <p>I'm looking to override the InvoiceOrder logic of the SOInvoiceEntry graph in the business logic, so I can change the logic that aggregates invoices if the 'Bill Separately' option is not selected.</p>
  
  <p>I've written an extension method below to replace the built in InvoiceOrder method.</p>
  
  <pre><code>public delegate void InvoiceOrderDelegate(DateTime invoiceDate, PXResult&lt;SOOrderShipment, SOOrder, CurrencyInfo, SOAddress, SOContact, SOOrderType&gt; order, PXResultset&lt;SOShipLine, SOLine&gt; details, Customer customer, DocumentList&lt;ARInvoice, SOInvoice&gt; list);
  
  [PXOverride]
  public virtual void InvoiceOrder(DateTime invoiceDate, PXResult&lt;SOOrderShipment, SOOrder, CurrencyInfo, SOAddress, SOContact, SOOrderType&gt; order, PXResultset&lt;SOShipLine, SOLine&gt; details, Customer customer, DocumentList&lt;ARInvoice, SOInvoice&gt; list, InvoiceOrderDelegate baseMethod)
  {
      //Do Stuff
  }
  </code></pre>
  
  <p>I'm unsure how to access the original object's protected methods. Normally I'd just call <code>Base.DoSomething();</code>, but I presume I can't access protected methods as the extension object is not directly derived from SOInvoiceEntry.</p>
  
  <p>Do I need to override the protected methods I want to use as well, or is there a way to access them from the extension?</p>
  
  <p>Any help would be awesome.</p>
  
  <p>Thanks.</p>