Click or drag to resize

IRoleAddFunctionRight Method

Add a function right to the active list. Use the function right id or the function right key-name (like 'admin-users')

Namespace:  SuperOffice.COM.SuperOfficeDB
Assembly:  SuperOfficeDB.Interop (in SuperOfficeDB.Interop.dll) Version: 8.0.0.0
Syntax
void AddFunctionRight(
	IListTextItem functionRight
)

Parameters

functionRight
Type: SuperOffice.COM.SuperOfficeDBIListTextItem
IListTextItem - Value from functionright table
Examples

Add function right

VB
Dim db As New Database
If db.Login("<username>", "<password>") Then
    Dim role As SORole = db.Admin.CreateRole(EnAssocRoleType.enRoleTypeEmployee, Nothing)
    role.Name = "the new role"
    role.Description = "this is the new role"
    role.Save()

    Dim allrights As IListTextItems = db.Admin.GetAllFunctionRights(EnAssocRoleType.enRoleTypeEmployee)
    Dim fr As IListTextItem = allrights(3)
    role.AddFunctionRight(fr)

    role.Save()
Else
    MsgBox("failed to log in")
End If

See Also