03-01-2017 03:26 AM
Hi, I am trying to get team member for a specified team. my code sample is someting like
var arr = _user.getSupervisedTeams();
$('#teamDropDown').append($("<option></option>")
.attr("value",'Teams')
.text('Select Team'));
for (i = 0; i < arr.length; i++) {
$('#teamDropDown').append($("<option></option>")
.attr("value",arr[i].id)
.text(arr[i].name));
}
try{
var team = arr[4];
var agents = team.getUsers();
}catch(err){
alert(err.message);
}
I am getting error while calling getUsers() function
error message is "getUsers is not a function"
please help me
03-01-2017 09:32 AM
Hi Navin,
According to the JS doc, the syntax of the method is getUsers(handlers). So the error is correct to say getUsers() is not a function.
I would suggest using the browser's developer tools to set a breakpoint and step through the code.
Thanx,
Denise
03-06-2017 06:46 AM
Try this:
_teams[team.getId()].users = team.getUsers({
onLoad: _onTeamUsersLoad,
onError: _onTeamError
});
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide