Hello all,
I have a Delegate which is triggered and also executes the base method from inside the delegate. The problem I have is that the remainder of the code after calling the base method is not executed. Any idea why? Here is the code. The breakpoint on “baseMethod...” gets hit but on “if (...” does not.
public class MyEPApprovalProcessExt : PXGraphExtension<EPApprovalProcess>
{
#region editDetailDelegate
public delegate IEnumerable editDetailDelegate(PXAdapter adapter);
[PXOverride]
[PXEditDetailButton]
public virtual IEnumerable editDetail(PXAdapter adapter, editDetailDelegate baseMethod)
{
baseMethod?.Invoke(adapter);
// Nothing is executed from here forward.
if (Base.Records.Current.RefNoteID.Value != null)
{
// Do some stuff
}
return adapter.Get();
}
#endregion
}
Any help is appreciated
