- Contents
Interaction Scripter Developer's Guide
User.startViewableWorkgroupsEnum Enumeration Property
Definition
This property returns an enumeration of viewable workgroups (workgroups the agent has rights to view) for the current agent The enumeration is traversed using the hasMoreElements and nextElement methods of the enumeration. Each call to the nextElement method returns successive elements of the series. The hasMoreElements method will return a Boolean true if this enumeration contains more elements.
Starting with 2018 R3, this property accepts an optional callback (for use with Connect scripts only) whose single parameter contains the result. See Interaction Connect Example in Queue.startCallObjectsEnum Enumeration Property for a related example that shows how a user-defined callback is used.
Syntax
Queue.startViewableWorkgroupsEnum
Usage
Read Yes
Write No
Value Assigned
None.
Value Returned
- Java Enumeration
-
The enumeration contains the list of viewable workgroups.
Java Enumeration Example (JavaScript)
// show all workgroups this user is permitted to view
var workgroups = scripter.myUser.startViewableWorkgroupsEnum;
while (workgroups.hasMoreElements()) {
alert(workgroups.nextElement());
}