Skip to main content

I have try to override ShowSplits mehod of LineSplittingExtension abstract class but debugger not coming on my method ShowSplits which I have overirde.

 

 

   
public class EWQCLineSplittingExtension:LineSplittingExtension {
public static bool IsActive() {
return EWQCFeatureSetHelper.IsEWQCManufacturingECCFeatureActive();
}

//override ShowSplits to update lot on line detail click
public override IEnumerable ShowSplits(PXAdapter adapter) {

lsselect.View.AskExt(true);
//base.showSplits();
MoveEntry moveEntryGraph = PXGraph.CreateInstance<MoveEntry>();
EWQCAMMoveEntryExt moveEntryGraphExt = moveEntryGraph.GetExtension<EWQCAMMoveEntryExt>();
moveEntryGraphExt.InsertLotsInLineDetails(false);

return adapter.Get();
}

}

Hi @bpatidar72 ,

Your class is not used by Acumatica, try to declare it in the similar way as POReceiptLineSplittingExtension

public class POReceiptLineSplittingExtension : LineSplittingExtension<POReceiptEntry, POReceipt, POReceiptLine, POReceiptLineSplit>

Another solution could be to create an extension of the LineSplittingExtension implementation used by your screen and override the ShowSplits method using >PXOverride].

using System;
using System.Collections;
using PX.Data;
using PX.Objects.PO;
using PX.Objects.PO.GraphExtensions.POReceiptEntryExt;

namespace EWQC;

public class EWQCPOReceiptLineSplittingExtension : PXGraphExtension<POReceiptLineSplittingExtension, POReceiptEntry>
{
PXOverride]
public virtual IEnumerable ShowSplits(PXAdapter adapter, Func<PXAdapter, IEnumerable> baseMethod)
{
Base1.lsselect.View.AskExt(true);
//base.showSplits();
MoveEntry moveEntryGraph = PXGraph.CreateInstance<MoveEntry>();
EWQCAMMoveEntryExt moveEntryGraphExt = moveEntryGraph.GetExtension<EWQCAMMoveEntryExt>();
moveEntryGraphExt.InsertLotsInLineDetails(false);

return adapter.Get();
}
}

 


Reply