cancel
Showing results for 
Search instead for 
Did you mean: 

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

d_eckervogt
Discoverer
0 Kudos

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();
        }
    }
}
Johan_H
Active Contributor
0 Kudos

Hi Silvia,

Please add the SAP Business One SDK tag to your question.

Regards,

Johan

former_member233854
Active Contributor
0 Kudos

Could you also share your code with us?

d_eckervogt
Discoverer
0 Kudos

Hi Danilo,

is the code I have posted enough or do you need some more to see where the Problem is?

Thanks and Best Regards.

Sylvia

Accepted Solutions (0)

Answers (1)

Answers (1)

tst1
Discoverer
0 Kudos
Hello Everyone,

I'm getting the same error, do you have a solution for this issue?