点击此处---> 群内免费提供SAP练习系统(在群公告中)
加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)
大家好,
对于某些用户定义的表单,我将通过权限树添加授权,这些用户定义的表单将在单击所属菜单项后打开。 当单击菜单项时,我将得到以下"权限覆盖"表格:
到目前为止一切顺利。 当我使用"另一个用户授权"按钮时,一切都会好起来(另一个用户的授权成功,等等),但是当我单击"确定"按钮时,出现以下错误消息:
,在此错误消息上单击"确定"后,我收到消息,提示无法打开表单:
有人可以帮我解决问题,因为我找不到有关此问题的更多信息。
addOn用C#编写
非常感谢。
西尔维娅
遵循创建权限树的代码
使用系统; 使用System.Collections.Generic; 使用System.Linq; 使用System.Text; 使用System.Threading.Tasks; 命名空间OCADDONS_MB { PermissionTree类 { 公共无效AddPermissionTreeForMBForms(SAPbobsCOM.ICompany公司) { SAPbobsCOM.UserPermissionTree oUserPermissionTree = null; oUserPermissionTree =(((SAPbobsCOM.UserPermissionTree)(company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserPermissionTree))));; oUserPermissionTree.PermissionID =" OCADDONS_MB"; oUserPermissionTree.Name ="设置"; oUserPermissionTree.Options = SAPbobsCOM.BoUPTOptions.bou_FullReadNone; oUserPermissionTree.IsItem = SAPbobsCOM.BoYesNoEnum.tNO; int returnCode = oUserPermissionTree.Add(); } 公共无效AddPermissionTreeChildGSForMBForms(SAPbobsCOM.ICompany公司) { SAPbobsCOM.UserPermissionTree oUserPermissionTree = null; oUserPermissionTree =(((SAPbobsCOM.UserPermissionTree)(company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserPermissionTree))));; oUserPermissionTree.PermissionID =" OCADDONS_MB_Global"; oUserPermissionTree.Name ="全局设置"; oUserPermissionTree.Options = SAPbobsCOM.BoUPTOptions.bou_FullReadNone; oUserPermissionTree.IsItem = SAPbobsCOM.BoYesNoEnum.tNO; oUserPermissionTree.ParentID =" OCADDONS_MB"; oUserPermissionTree.UserPermissionForms.FormType =" OCADDONS_MB.GS"; int returnCode = oUserPermissionTree.Add(); } 公共无效AddPermissionTreeChildVSForMBForms(SAPbobsCOM.ICompany公司) { SAPbobsCOM.UserPermissionTree oUserPermissionTree = null; oUserPermissionTree =(((SAPbobsCOM.UserPermissionTree)(company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserPermissionTree))));; oUserPermissionTree.PermissionID =" OCADDONS_MB_View"; oUserPermissionTree.Name ="视图设置"; oUserPermissionTree.Options = SAPbobsCOM.BoUPTOptions.bou_FullReadNone; oUserPermissionTree.IsItem = SAPbobsCOM.BoYesNoEnum.tNO; oUserPermissionTree.ParentID =" OCADDONS_MB"; oUserPermissionTree.UserPermissionForms.FormType =" OCADDONS_MB.VS"; int returnCode = oUserPermissionTree.Add(); } 公共无效AddPermissionTreeChildVSUForMBForms(SAPbobsCOM.ICompany公司) { SAPbobsCOM.UserPermissionTree oUserPermissionTree = null; oUserPermissionTree =(((SAPbobsCOM.UserPermissionTree)(company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserPermissionTree))));; oUserPermissionTree.PermissionID =" OCADDONS_MB_UserView"; oUserPermissionTree.Name ="用户视图设置"; oUserPermissionTree.Options = SAPbobsCOM.BoUPTOptions.bou_FullReadNone; oUserPermissionTree.IsItem = SAPbobsCOM.BoYesNoEnum.tNO; oUserPermissionTree.ParentID =" OCADDONS_MB"; oUserPermissionTree.UserPermissionForms.FormType =" OCADDONS_MB.VSU"; int returnCode = oUserPermissionTree.Add(); } } }
(7.8 kB)
嗨,西尔维娅,
请在您的问题中添加 SAP Business One SDK 标记。
此致
Johan
您还可以和我们分享您的代码吗?
嗨Danilo,
我发布的代码是否足够?还是您需要更多代码来查看问题所在?
谢谢和最好的问候。
西尔维娅
一周热门 更多>