Skip to Content
0

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

Aug 30, 2017 at 09:24 AM

63

avatar image

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

Hi Silvia,

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

Regards,

Johan

0

Could you also share your code with us?

0

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

0
* Please Login or Register to Answer, Follow or Comment.

0 Answers