01-26-2018 01:28 AM
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
01-26-2018 12:32 PM
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
01-30-2018 01:53 AM
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
01-30-2018 11:12 PM
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
05-08-2018 02:04 AM
Thanks. It's working now.
05-08-2018 10:30 AM
Great!
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