Websydian v6.1 online documentationOnline documentation - WebsydianExpress v3.0

API: Role.CreateRole

Scoped Name

APIServer.Role.CreateRole

Interface

Field Variable ...as Description
RoleName InsertData Input The name of the role. This must be unique for the site (mandatory).
RoleDescription InsertData Input A textual description of the role (optional).
RoleComment InsertData Input Numeric field - indicates the "importance" of the role. Used for situations where a session is authorized by more than one role and a choice between the roles are necessary. The higher the number, the more important the role is. (optional)
RolePriority InsertData Input The priority of the role (optional).

The higher priority, the more "important" the role.

If there is a choice between for instance two folder lists, the one that is assigned to the role having the highest priority is used.

RoleSiteKey InsertData Input The site which the role belongs to. (mandatory)
RoleFolderListID InsertData Input The folder list to be used for sessions authorized by this role. (mandatory)
RoleSurrogate Output Output The unique identification of the created role.

If the validation or creation of the record fails, the returned RoleSurrogate will be 0.

NumberOfErrors Error Output The number of errors encountered and reported in the ErrorArray.
ErrorMessage ErrorArray(20) Output A description of an error, which has occurred during either validation or create.

Description

Validates and creates a role for a specific site.

If the validation fails, the Environment<*Returned status> field is set to a non-successful value and for each error an error message can be written in the ErrorArray output variable. The output field NumberOfErrors is set to the number of errors returned in ErrorArray.

Events

Universal events