cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
306
Views
0
Helpful
1
Replies

Reload User Rest Object

Jeremy Guillory
Level 1
Level 1

I am looking at the phone book sample gadget and trying to figure out how to get the phonebook to update without reloading the entire Finesse webpage.  I have tried to create a new finesse.restservices.User to reload the phonebook but the onLoad function never fires.  I have also tried to reload the entire gadget using containerServices.reloadMyGadgetFromUrl().  This will reload the gadget but it does not appear to grab the modified phonebook. 


Does anyone know of a way to reinitialize the gadget similar to hitting the refresh button in the browser using code?

1 Accepted Solution

Accepted Solutions

ewindgat
Level 5
Level 5

If you are only trying to reload the phone book, you might try just refreshing the data.

Here, the user object is initiated for the REST calls.

user = new finesse.restservices.User

It is then called on load. You could call this a second time, when you need to.

_phoneBooks = user.getPhoneBooks({

  onLoad : _handlePhoneBooksLoaded,

  onError : _handlePhoneBooksError

  });

View solution in original post

1 Reply 1

ewindgat
Level 5
Level 5

If you are only trying to reload the phone book, you might try just refreshing the data.

Here, the user object is initiated for the REST calls.

user = new finesse.restservices.User

It is then called on load. You could call this a second time, when you need to.

_phoneBooks = user.getPhoneBooks({

  onLoad : _handlePhoneBooksLoaded,

  onError : _handlePhoneBooksError

  });

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: