Hi,
How I can override the CorrectInvoice action from the Correction graph extension?
I’m using this code, but the page give me an error.
public class Test : Correction
{
public static bool IsActive()
{
return true;
}
public override void Initialize()
{
base.Initialize();
}
public override IEnumerable CorrectInvoice(PXAdapter adapter)
{
return base.CorrectInvoice(adapter);
}
}
Error
rArgumentNullException: Value cannot be null.Parameter name: key] System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument) +52 System.Collections.Generic.Dictionary`2.FindEntry(TKey key) +14244583 System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value) +21 PX.Web.UI.WebApi.Services.QPToolBarDataProvider.GetActionsSource(PXGraph graph, Boolean isPopupOn, Boolean popupInline, IScreenCommandsCustomInfo screenCommandsCustomInfo) +1495 PX.Web.UI.PXBaseDataSource.GetActionsSource() +305 PX.Web.UI.PXToolBar.IsToolbarEmpty() +53 PX.Web.UI.PXToolBar.Render(HtmlTextWriter writer) +195 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +132 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +271 PX.Web.UI.PXBaseDataSource.webControlRender(HtmlTextWriter writer) +141 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +132 PX.Web.UI.PXBaseDataSource.RenderControl(HtmlTextWriter writer) +50 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +271 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +132 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +271 System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +47 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +132 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +271 System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +208 System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +47 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +132 System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +69 ASP.masterpages_formdetail_master.__Render__control1(HtmlTextWriter __w, Control parameterContainer) +200 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +117 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +132 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +271 System.Web.UI.Page.Render(HtmlTextWriter writer) +39 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +132 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +9480
Thanks,
EV