发行套件组装后如何更新套件组装扩展表字段? [英] How to update Kit Assembly extension table fields after releasing Kit Assembly?

查看:74
本文介绍了发行套件组装后如何更新套件组装扩展表字段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在工具包装配屏幕上,一旦我释放了工具包装配,便永远无法更新INKitAssembly,

IN Kit Assembly screen, once i release Kit Assembly then i can never update INKitAssembly,

但是我必须允许KitAssembly Extension表字段进行更新。我如何允许更新在INRegister(InKitAssembly)扩展表中添加的自定义字段?

But I have to allow KitAssembly Extension table fields to update. how may i allow to update custom fields added in INRegister(InKitAssembly) extension table?

是否有一种方法可以在Release操作完成时更新InKitAssembly扩展表字段,您是否有在release kitAssembly中完成长时间操作后,是否可以回叫委托?

Is there a way to update InKitAssembly extension table fields on Release operation completion, DO you have any call back delegate after Release kitAssembly long operation completion?

推荐答案

在INReleaseProcess中更新扩展值的持久性应该起作用。像这样:

Updating your extension values in the INReleaseProcess persist should work. Something like this:

public class INReleaseProcessExte : PXGraphExtension<INReleaseProcess>
{
    [PXOverride]
    public virtual void Persist(Action del)
    {
        foreach (INTran row in Base.intranselect.Cache.Updated)
        {
            if (row?.DocType != INDocType.Production || row.Released != true)
            {
                continue;
            }

            // update your extension here
            var inTranExt = PXCache<INTran>.GetExtension<INTranMyExtension>(row);
            inTranExt.MyField = "X";
            Base.intranselect.Update(row);
        }

        del?.Invoke();
    }
}

这篇关于发行套件组装后如何更新套件组装扩展表字段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆