如何从 GL Post 交易屏幕向 'Post' 操作添加自定义代码

How to add custom code to the 'Post' action from the GL Post Transactions screen

我需要将自定义代码添加到在 GL 'Post Transactions' 屏幕上发布交易的逻辑中。在浏览了 T300 文档并查看 'Release' 的覆盖作为示例后,我在 'BatchPost' BLC 中找不到任何与我可以覆盖的发布过程 event/method 远程相似的东西.我在哪里可以找到该逻辑以及将我的自定义代码逐批添加到发布流程的最佳方式是什么?

我认为覆盖发布过程的最佳方法是覆盖 PX.Objects.GL.PostGraph.PostBatchProc(Batch b, bool createintercompany)

与发布相关的所有逻辑都位于此处。

这是一个例子:

public class PostGraphExt : PXGraphExtension<PostGraph>
{
    public delegate Batch PostBatchProcDelegate(Batch b, bool createintercompany);
    [PXOverride]
    public virtual void PostBatchProc(Batch b, bool createintercompany, PostBatchProcDelegate baseMethod)
    {
        //your code here
        baseMethod(b, createintercompany);
        //or here
    }
}