📚 SAP Business One SDK Help

GetLicenseStatus Method
See Also  Example
UserName
The use name.
FormID
The form ID. You can get the from ID from View → System Information.

Description

You can get the information whether a user has a license to access a form.

Syntax

Visual Basic
Public Function GetLicenseStatus( _
   ByVal UserName As String, _
   ByVal FormID As String _
) As Long

Parameters

UserName
The use name.
FormID
The form ID. You can get the from ID from View → System Information.

Remarks

Note: If either of the input parameter UserName or FormID is not valid, the returned value will not be accurate.

This function can be called by any user. A super user can check any user, while a regular user can check his/her own user only. If a regular user tries to check a different user name, an error occurs: "You are not permitted to perform this action".

Example

C#Copy Code
static void GetLicenseStatusDemo(Company oCompany) 
        { 
            SAPbobsCOM.SBObob oSBObob = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoBridge); 
            try 
            { 
                int retValue1 = oSBObob.GetLicenseStatus("manager", "1320000000"); //2 
                
            } 
            catch (Exception ex) 
            { 
                Console.Write(ex.ToString()); 
                return; 
            } 
 
        } 

See Also