Skip to main content

Get the privileged user list

In a Purchase Request Process of the example mentioned in Grant case access, we want to show the list of the users with access to the case in the Summary form.

In step four of the Process Wizard, select the Activity Actions to create an expression On Exit of the first Activity.

CaseSecurity35

The expression retrieves the list of privileged users of the case and stores them in the collection UsersCaseAccess.

CaseSecurity36

var UsersArray = new ArrayList();

// Get the list of privileged users
UsersArray = CHelper.GetCaseAccessUsers(Me.Case.Id);

for(Counter=0; Counter < UsersArray.Count; Counter++)
{
// Add users to the UsersCaseAccess collection
var PUser = Me.newCollectionItem("PurchaseRequest.UsersCaseAccess");
PUser.setXPath("Userwithaccess", UsersArray[Counter]);
}

When the case is advanced, the users in the privileged list are displayed in the collection added in the Summary form.

pic