单据列表中启用附件管理操作原创
金蝶云社区-云社区用户6XE29259
云社区用户6XE29259
7人赞赏了该文章 1,344次浏览 未经作者许可,禁止转载编辑于2019年11月26日 11:33:32
单据列表中默认没有无法用附件管理,变通实现的方式如下(建议谨慎使用,目前没有做权限控制,需要自己控制权限),在列表插件中试下如下方法:

public override void BeforeDoOperation(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.BeforeDoOperationEventArgs e)
        {
            base.BeforeDoOperation(e);
            if (e.Operation.FormOperation.OperationId == FormOperation.Operation_AttachmentMgr)
            {
                e.Option.SetVariableValue("ForceEnableAttachOperate", true);
            }
        }

Python插件版本如下:

clr.AddReference("Kingdee.BOS.Core")
from Kingdee.BOS.Core.Metadata.FormElement import * 

def BeforeDoOperation(e):
if (e.Operation.FormOperation.OperationId == FormOperation.Operation_AttachmentMgr):
e.Option.SetVariableValue("ForceEnableAttachOperate", True);

赞 7