-
-
Save kjrichardson/e5e8b7d2656fa66617e0cb301defebe1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//create protected access function that allows the graphs it is extending to access protected methods. | |
[PXProtectedAccess] | |
public abstract class POCreate_ProtectedExtension : PXGraphExtension<POCreate_Extension, POCreate> | |
{ | |
[PXProtectedAccess(typeof(POCreate))] | |
protected abstract void LinkPOLineToSOLineSplit(POOrderEntry docgraph, SOLineSplit3 soline, POLine line); | |
} | |
//standard graph extension | |
public class POCreate_Extension : PXGraphExtension<POCreate> | |
{ | |
//protected method that is being overridden | |
public delegate void LinkPOLineToSOLineSplitDelegate(POOrderEntry docgraph, SOLineSplit3 soline, POLine line); | |
[PXOverride] | |
public virtual void LinkPOLineToSOLineSplit(POOrderEntry docgraph, SOLineSplit3 soline, POLine line, LinkPOLineToSOLineSplitDelegate del) | |
{ | |
del?.Invoke(docgraph, soline, line); | |
//execute custom code | |
POLineExt rowExt = line.GetExtension<POLineExt>(); | |
SOLine solineactual = SOLine.PK.Find(docgraph, soline.OrderType, soline.OrderNbr, soline.LineNbr); | |
SOLineExt lineExt = solineactual.GetExtension<SOLineExt>(); | |
docgraph.Transactions.SetValueExt<POLineExt.usrHWSOPurchasingNote>(line, lineExt.UsrPuchasingNote); | |
docgraph.Transactions.SetValueExt<POLineExt.usrHWSOPuchaseDeliveryOptions>(line, lineExt.UsrPuchaseDeliveryOptions); | |
docgraph.Transactions.SetValueExt<POLineExt.usrHWSOPurchasePriority>(line, lineExt.UsrPurchasePriority); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment