Skip to Content

internal error -10 after pressed OK at "Permission override" form

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();
        }
    }
}
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers