cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1032
Views
3
Helpful
5
Replies

Multiple agents logout or not ready in a single click using Gadgets

Hi All,

I am writing to get your valuable thought about multiple agents logout and not-ready in a single click.

My goal is to make a new gadgets for supervisors where they can see their respective agent team. Select team from the drop-down list and all logged in agents will show. It will show in a grid view with check box. Select-all button will select all agents and then supervisor can do make then Not-ready or Logged out.

To achieve this. I could to go further due to lack of vast knowledge in java-script

I am getting "Uncaught Error: Cannot operate on object that is not fully instantiated, use onLoad/onLoadError handlers" error message.

Here is my sample code for Pull Agent Team button onClick event but getting above error while it's getSupervisedTeams();

return {

    pullSupervisorTeam : function(){

    var user1 = new finesse.restservices.User();

    var teams = user1.getSupervisedTeams();

        for(var i=0; i<teams.length;i++){

            var team=teams[i];

           $('#result').html(team);

        }

    },

Please help with with solutions.

Thanks

Sultan Al Arif

5 Replies 5

dekwan
Cisco Employee
Cisco Employee

Hi,

Please take a look at this post to see how to use the object after getting it from getSupervisedTeams(): Re: Supervised Teams getUsers object

Thanx,

Denise

Hi,

Thanks for your reply. I had looked at that page but most probably it does not match what I want. My error is in very early stage of the code. I click a button to see my Team List. To show team list I have an on-call event inside return statement. getting error while using getSupervisedTeams(); method. Cannot operate on object that is not fully instantiated, use onLoad/onLoadError handlers

Hi,

You have not instantiated the user1 variable correctly:

var user1 = new finesse.restservices.User();

It should be something like this with handlers:

user = new finesse.restservices.User({

                id: cfg.id,

                onLoad : handleUserLoad,

                onChange : handleUserChange

            });

Please take a look at a sample gadget such as the learning sample gadget for more details.

Thanx,

Denise

Thanks. It's working now.

Great!

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: