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

API: Role.ValidateRole

Scoped Name

APIServer.Role.ValidateRole

Interface

Field Variable ...as Description
RoleSurrogate Data Input The unique identification of the created role. Must be specified when ValidationType is update.
RoleName Data Input The name of the role. This must be unique for the site.
RoleDescription Data Input A textual description of the role.
RoleComment Data Input Comment field for the role.
RolePriority Data 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.
RoleSiteKey Data Input The site which the role belongs to.
RoleFolderListID Data Input The folder list to be used for sessions authorized by this role.
ValidationType Input Input Specifies whether the record should be validated for update or insert.
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 whether a role can be inserted or updated. This API does not update or create the role.

If the validation fails the *Returned status 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.

The validation can be called for either update or insert - specified by the input parameter ValidationType.

This is the same validation that is performed by Role.CreateRole and Role.UpdateRole.

Events

Universal events