This document was generated from CDN thread
Created by: Juan Othmaro Menjivar on 16-05-2013 05:33:28 PM
I'm in the process of writing my first Finesse Gadget and I'm trying to read Agent's PhoneBook, reading API documentation it points that I need to create an user object which I already did and it works because I'm pulling state and firstname and in order to read phone books I'm executing the following code:
var colPhoneBook;
colPhoneBook = user.getPhoneBooks();
alert (colPhoneBook.lenght); /** I'm never seeing this popup **/
Any help would be appreciated.
PS. I already checked and I do have 2 phone books created and accessibility set to ALL USERS.
Subject: RE: Finesse API
Replied by: David Lender on 21-05-2013 09:28:48 AM
The user.getPhoneBooks api requires you specify callback handlers like this: _phoneBooks = user.getPhoneBooks({ onLoad : _handlePhoneBooksLoaded, onError : _handlePhoneBooksError });
Subject: RE: Finesse API
Replied by: David Lender on 21-05-2013 04:34:30 PM
The Finesse javascript library has been updated to include support for the PhoneBooks/PhoneBook APIs and is now available for download under the Tools directory. I have also attached a PhoneBook sample to this post that is a modification of SampleGadget_Final to display the User's phonebook contacts at the bottom of the gadget. If you have questions about using the PhoneBooks/PhoneBook API let us know.
Subject: RE: Finesse API
Replied by: Juan Othmaro Menjivar on 21-05-2013 04:44:34 PM
Thank you very much for your help David, I'll be checking this code later today and will let you know any progress.
I'm curious about the syntaxes’ because I'm using the html API reference available through the web site and it doesn't detail about handlers in the getPhoneBook method. How are we supposed to know which are the required handles for any method?
You’re collaboration would be much appreciated.
Juan