通过SQL语句在后台为新单添加导出单据模板和导入单据数据事件
--新单导出单据模板和导入单据数据无法添加事件
--此语句用于获取单据类型ID,获取的类型ID用作@FClassTypeID的参数值:
select FID as FClassTypeID,* from ICClassType where FName_CHS like '%出差(借款)%' --1013302
DECLARE @FClassTypeID int
SET @FClassTypeID=1013302 --注意:请在此处输入正确的单据类型ID(此处以费用(借款)申请单为例:FClassTypeID=1013302)
IF EXISTS(select 1 from ICClassType where FID=@FClassTypeID)
BEGIN
IF NOT EXISTS(SELECT 1 FROM ICClassActionList WHERE FClassTypeID=@FClassTypeID AND FClassActionID=100026)
BEGIN
--添加操作Action:导出单据模板
INSERT INTO ICClassActionList(FClassTypeID,FClassActionID,FObject,FDefineType,FSourceType,FSourceField,FAction,FExpression,FOrder,FDescription)
VALUES (@FClassTypeID,100026,'mnuFileExportBillTpl',0,256,'FBillAction','','',1,'单据操作 Action 定义')
END
IF NOT EXISTS(SELECT 1 FROM ICClassActionList WHERE FClassTypeID=@FClassTypeID AND FClassActionID=100027)
BEGIN
--添加操作Action:导入单据数据
INSERT INTO ICClassActionList(FClassTypeID,FClassActionID,FObject,FDefineType,FSourceType,FSourceField,FAction,FExpression,FOrder,FDescription)
VALUES (@FClassTypeID,100027,'mnuFileImportBill',0,256,'FBillAction','','',1,'单据操作 Action 定义')
END
--更新缓存
UPDATE ICClassType SET FID=FID
END
GO
通过SQL语句在后台为新单添加导出单据模板和导入单据数据事件
本文2024-09-22 16:39:37发表“k3wise知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3wise-89364.html