cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
406
Views
0
Helpful
2
Replies

Get team member for a team

Navin_saxena1
Level 1
Level 1

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

2 Replies 2

dekwan
Cisco Employee
Cisco Employee

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

Try this:

_teams[team.getId()].users = team.getUsers({

            onLoad: _onTeamUsersLoad,

            onError: _onTeamError

        });

Please rate helpful posts and if applicable mark "Accept as a Solution".
Thanks, Thomas G. J.