Skip to main content
Answer

Override POOrderEntry ReleaseFromHold

  • August 18, 2023
  • 2 replies
  • 139 views

Forum|alt.badge.img+1

I’m attempting to override the ReleaseFromHold action on the POOrderEntry graph, I need to add my own validation before the baseMethod is called.

I created the delegate using the following code, but I receive the error message below.

I’ve been able to override other action on this same graph using this method, is there something unique about the ReleaseFromHold action?

 

        public delegate IEnumerable ReleaseFromHoldDelegate(PXAdapter adapter);
[PXOverride]
protected IEnumerable ReleaseFromHold(PXAdapter adapter, ReleaseFromHoldDelegate baseMethod)
{
return adapter.Get();
}

 

8/18/2023 2:46:05 PM Error:
Attempt by method 'Wrapper.PX.Objects.PO.Cst_POOrderEntry.ReleaseFromHoldGeneratedWrapper(PX.Objects.PO.POOrderEntry, PX.Data.PXAdapter)' to access method 'PX.Objects.PO.POOrderEntry_Ext.ReleaseFromHold(PX.Data.PXAdapter, ReleaseFromHoldDelegate)' failed.

   at Wrapper.PX.Objects.PO.Cst_POOrderEntry.ReleaseFromHoldGeneratedWrapper(POOrderEntry g, PXAdapter )
   at PX.Data.PXAction`1.RunHandler(PXAdapter adapter)
   at PX.Data.PXAction`1.d__38.MoveNext()
   at PX.Data.PXAction`1.d__38.MoveNext()
   at PX.Web.UI.PXBaseDataSource.tryExecutePendingCommand(String viewName, String[] sortcolumns, Boolean[] descendings, Object[] searches, Object[] parameters, PXFilterRow[] filters, DataSourceSelectArguments arguments, Boolean& closeWindowRequired, Int32& adapterStartRow, Int32& adapterTotalRows)
   at PX.Web.UI.PXBaseDataSource.ExecuteSelect(String viewName, DataSourceSelectArguments arguments, PXDSSelectArguments pxarguments)

Best answer by scottstanaland12

Nevermind dumb error on my part, I did not have the override declared as a public method.

2 replies

Forum|alt.badge.img+1
  • Author
  • Jr Varsity III
  • Answer
  • August 18, 2023

Nevermind dumb error on my part, I did not have the override declared as a public method.


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • August 18, 2023

Thank you for sharing your solution with the community @scottstanaland12!