/mcpMethods clearData(callback) Clears all the records in the database. Example finesse.utilities.DesktopCache.clearData(function(err) { if (!err) { // Successfully cleared the records! } }); Parameters Required Description Type Name No An asynchronous callback function that is invoked after all the records in the IndexedDB is cleared Function callback deleteData(key, callback) Deletes the record that corresponds to the key passed from the database. Example // inside the gadget somewhere if (userClickedOk) { finesse.utilities.DesktopCache.delete('someKey', function(err, data) { if (!err) { // Successfully deleted! Now do something else. } }); } Parameters Required Description Type Name Yes The unique identifier which is used to delete a record from the IndexedDB. String key No An asynchronous callback function that is invoked after the attempt to delete the record (success or fail). Function callback No The JavaScript error message. Object -->err fetchData(key, callback) Retrieves the records corresponding to the key passed. Example // fetching all the records finesse.utilities.DesktopCache.fetchData(null, function(err, data) { if (!err) console.log(data); // will print something like [{key: someKey, data: someData}, {key: otherKey, data: otherData}.......] }); Cisco Finesse Web Services Developer and JavaScript Guide, Release 12.5(1) 535 Cisco Finesse JavaScript APIs Desktop Cache