Hello, I want to run some code when the ‘Line Details’ button is clicked on Purchase Receipts. Overriding the appropriate method seems like the way to go but I’m struggling to get the code to work.
![](https://uploads-us-west-2.insided.com/acumatica-en/attachment/59434170-06eb-4637-bec0-029361eac3c1.png)
The button calls a method called ShowSplits, this displays a SmartPanel. I want to do something when the SmartPanel closes. Unfortunately this method is in an extension (POReceiptLineSplittingExtension) so I’ve tried to define the extensions in the class definition for my extension. My code looks like this
public class POReceiptLineSplittingExtension_Extension : PXGraphExtension<POReceiptLineSplittingExtension, LineSplittingExtension<POReceiptEntry, POReceipt, POReceiptLine, POReceiptLineSplit>, POReceiptEntry>
{
public delegate IEnumerable ShowSplitsDelegate(PXAdapter adapter);
ePXOverride]
public IEnumerable ShowSplits(PXAdapter adapter, ShowSplitsDelegate baseMethod)
{
var ret = baseMethod(adapter);
//Do Something
return ret;
}
}
This compiles but when I open the Purchase Receipts screen, the page crashes, I get the following message.
Graph extension PX.Objects.PO.GraphExtensions.POReceiptEntryExt.POReceiptLineSplittingExtension_Extension cannot refer to the following abstract graph extensions that are not marked as tPXProtectedAccess]: PX.Objects.IN.GraphExtensions.LineSplittingExtension`4gPX.Objects.PO.POReceiptEntry,PX.Objects.PO.POReceipt,PX.Objects.PO.POReceiptLine,PX.Objects.PO.POReceiptLineSplit].
I think this might be appearing because class LineSplittingExtension is defined as abstract. Can anyone advise how I can get access to the ShowSplits method in POReceiptLineSplittingExtension?