08-30-2017 10:24 AM - edited 02-04-2024 2:01 AM
Hello Everyone,
for some User Defined Forms, which will be opened after clicking onto the belonging menue item, I have added authorisations via permission tree. When clicking on the menue item, I get the following "Permission override" form:
So far so good. When I use the button "Authorised by Another User" everything will be allright (authorisation by another user and so on is successful), but when I click on the OK button, I get the following error message:
and after clicking OK on this error message, I get the message, that the form cant be opened:
Can someone help me please to solve the problem, because I cant find further information regarding this issue.
The addOn is written in C#
Many thanks in advance.
Sylvia
Following the Code for creating the permission tree
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OCADDONS_MB
{
class PermissionTree
{
public void AddPermissionTreeForMBForms(SAPbobsCOM.ICompany company)
{
SAPbobsCOM.UserPermissionTree oUserPermissionTree = null;
oUserPermissionTree = ((SAPbobsCOM.UserPermissionTree)(company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserPermissionTree)));
oUserPermissionTree.PermissionID = "OCADDONS_MB";
oUserPermissionTree.Name = "Settings";
oUserPermissionTree.Options = SAPbobsCOM.BoUPTOptions.bou_FullReadNone;
oUserPermissionTree.IsItem = SAPbobsCOM.BoYesNoEnum.tNO;
int returnCode = oUserPermissionTree.Add();
}
public void AddPermissionTreeChildGSForMBForms(SAPbobsCOM.ICompany company)
{
SAPbobsCOM.UserPermissionTree oUserPermissionTree = null;
oUserPermissionTree = ((SAPbobsCOM.UserPermissionTree)(company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserPermissionTree)));
oUserPermissionTree.PermissionID = "OCADDONS_MB_Global";
oUserPermissionTree.Name = "Global Settings";
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();
}
public void AddPermissionTreeChildVSForMBForms(SAPbobsCOM.ICompany company)
{
SAPbobsCOM.UserPermissionTree oUserPermissionTree = null;
oUserPermissionTree = ((SAPbobsCOM.UserPermissionTree)(company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserPermissionTree)));
oUserPermissionTree.PermissionID = "OCADDONS_MB_View";
oUserPermissionTree.Name = "View Settings";
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();
}
public void AddPermissionTreeChildVSUForMBForms(SAPbobsCOM.ICompany company)
{
SAPbobsCOM.UserPermissionTree oUserPermissionTree = null;
oUserPermissionTree = ((SAPbobsCOM.UserPermissionTree)(company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserPermissionTree)));
oUserPermissionTree.PermissionID = "OCADDONS_MB_UserView";
oUserPermissionTree.Name = "User View Settings";
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();
}
}
}
I'm getting the same error, do you have a solution for this issue?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
102 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.