📚 SAP Business One SDK Help

GetSystemPermission Method
See Also  Example
UserName
A user code
PermissionID

A permission ID

A list of permissions is available at Permissions List.

Description

Returns the permission for a type of permission for a specific user.

Syntax

Visual Basic
Public Function GetSystemPermission( _
   ByVal UserName As String, _
   ByVal PermissionID As String _
) As Recordset

Parameters

UserName
A user code
PermissionID

A permission ID

A list of permissions is available at Permissions List.

Return Type

One of the following values:

1: Read/Write

2: Read only

3: Not authorized

4: Various authorizations

6: Not defined

Example

Getting permissions (Visual Basic)Copy Code
Dim oSBObob As SAPbobsCOM.SBObob
Dim oRecordSet As SAPbobsCOM.Recordset

'// Get an initialized SBObob object
oSBObob = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoBridge)

'// return the General permission (142) for the manager
oRecordSet = oSBObob.GetSystemPermission("manager", "142")

'// Print permission value (Read/Write=1, ReadOnly=2, NoAuthorization=3,
'// VariousAuthorization=4, NotDefined=6)
Debug.WriteLine(oRecordSet.Fields.Item(0).Value())

See Also