/SOOrderEntryIsCopyOrderExt.cs Secret
Last active
February 17, 2023 20:20
Star
You must be signed in to star a gist
SOOrderEntryIsCopyOrderExt Acumatica
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
[PXProtectedAccess(typeof(SOOrderEntry))] | |
public abstract class SOOrderEntryIsCopyOrderExt : PXGraphExtension<SOOrderEntry> | |
{ | |
[PXProtectedAccess] | |
public abstract bool IsCopyOrder { get; set; } | |
} | |
public class SOOrderEntry_Extension : PXGraphExtension<SOOrderEntryIsCopyOrderExt, SOOrderEntry> | |
{ | |
//custom copy order class that is called from a process/action that is different than the standard copy order process | |
public virtual void CopyAutoOrder(SOOrder sourceOrder, CopyParamFilter copyFilter, HWAutoOrder autoOrder) | |
{ | |
Base.Save.Press(); | |
SOOrder order = PXCache<SOOrder>.CreateCopy(sourceOrder); | |
//set the copy order flag to true | |
Base1.IsCopyOrder = true; | |
//set our auto order flag | |
IsAutoOrder = true; | |
try | |
{ | |
//call base copy order proc that the action calls. | |
Base.CopyOrderProc(sourceOrder, copyFilter); | |
//set additional properties from other fields on the SO Order to their proper fields | |
//save the order | |
} | |
catch { } | |
finally | |
{ | |
Base1.IsCopyOrder = false; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment