title: Overriding second level graph extension method in Acumatica
body: <p>I need to work with the reusable business objects for Sales tax, discounts, etc. and need to override some of the methods in these graph extensions. For example I am starting with the Opportunities graph. I have a set of order totals that need to calculate into the overall products amount and in the past we just overrode the tax attribute on (I think) tax category. Anyhow I don't see how its possible to use the <code>PXOverrideAttribute</code> on a method from a second level graph extension.</p>
  
  <p>Here is my example:</p>
  
  <pre><code>public class OpportunityMaintExtOne : PXGraphExtension&lt;PX.Objects.CR.OpportunityMaint.SalesTax, PX.Objects.CR.OpportunityMaint&gt;
  { 
      [PXOverride]
      public virtual void CalcDocTotals(object row, decimal CuryTaxTotal, decimal CuryInclTaxTotal, decimal CuryWhTaxTotal,
          Action&lt;object, decimal, decimal, decimal&gt; del)
      {
          del?.Invoke(row, CuryTaxTotal, CuryInclTaxTotal, CuryWhTaxTotal);
  
          var someOtherTotal = Base1.Documents.Cache.GetValueAsDecimal&lt;CROpportunityExtension.aMCurySomeOtherTotal&gt;(row);
          if (someOtherTotal == 0)
          {
              return;
          }
  
          var curyDocTotal = someOtherTotal + Base1.Documents.Cache.GetValueAsDecimal&lt;CROpportunity.curyProductsAmount&gt;(row);
          Base1.Documents.Cache.SetValue&lt;CROpportunity.curyProductsAmount&gt;(row, curyDocTotal);
      }
  }
  </code></pre>
  
  <p>What is going on inside of <em>CalcDocTotals</em> in my graph extension is not the focus. It is the fact that I cannot override the <code>OpportunityMaint.SalesTax CalcDocTotals</code> method as I could if the method was in the first level (Base) graph. The SalesTax graph extension has the method as protected but protected methods (if it was in the base graph) are overrideable using the PXOverrideAttribute if you make your method call public which is what I have done. I also tried using a declared delegate in place of the Action but same results (as I expected but wanted to confirm).</p>
  
  <p>My question: <strong>Is it possible to override a second, third, etc. level graph extension method using the PXOverrideAttribute?</strong> </p>
  
  <p>When I compile the code above and the page loads I get this error:</p>
  
  <blockquote>
    <p>Method Void CalcDocTotals(System.Object, System.Decimal,
    System.Decimal, System.Decimal,
    System.Action`4[System.Object,System.Decimal,System.Decimal,System.Decimal])
    in graph extension is marked as [PXOverride], but the original method
    with such name has not been found in PXGraph</p>
  </blockquote>