问题
IN Kit Assembly screen, once i release Kit Assembly then i can never update 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?
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?
回答1:
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();
}
}
来源:https://stackoverflow.com/questions/61660919/how-to-update-kit-assembly-extension-table-fields-after-releasing-kit-assembly