on 01-24-2014 06:00 PM
Joseph Horvath:It's quite easy to add the JavaScript code that is required to modify Call Variables. Just pattern it after the "updateWrapUpReason" code.
@Joseph Horvath Can you please explain a little more what is "options" in the parameters?
Hi Rana,
Joseph uses the options parameter to pass into this.restRequest. So looking at the javaDoc for restRequest in the finesse.js, it states:
* @param {Object} options
* An object containing additional options for the request.
* @param {Object} options.content
* An object to send in the content body of the request. Will be
* serialized into XML before sending.
* @param {String} options.method
* The type of request. Defaults to "GET" when none is specified.
* @param {Function} options.success(rsp)
* A callback function to be invoked for a successful request.
* {
* status: {Number} The HTTP status code returned
* content: {String} Raw string of response
* object: {Object} Parsed object of response
* }
* @param {Function} options.error(rsp)
* A callback function to be invoked for an unsuccessful request.
* {
* status: {Number} The HTTP status code returned
* content: {String} Raw string of response
* object: {Object} Parsed object of response
* error: {Object} Wrapped exception that was caught
* error.errorType: {String} Type of error that was caught
* error.errorMessage: {String} Message associated with error
* }
Hope this helps.
Thanx,
Denise
What do I pass to this method for `options`? Can you please share an example of "options"? I thought it is dialog, but now it is not clear what is the structure of this object and is it already in gadget context, or I have to make a new one.
Thanks,
Waqas
Hi,
Take a look at the javaDoc above, it states:
* @param {Object} options.content
* An object to send in the content body of the request. Will be
* serialized into XML before sending.
* @param {String} options.method
* The type of request. Defaults to "GET" when none is specified.
* @param {Function} options.success(rsp)
Unfortunately, I do not have an example.
Thanx,
Denise
I used this method and getting the errors about
this.isLoaded
is undefined.
options.content[this.getRestType()] =
{
"requestedAction": finesse.restservices.Dialog.Actions.UPDATE_CALL_DATA,
"mediaProperties": mediaProperties
};
this.getRestType is not a function exception.
I am testing this on Cisco Finesse 11.0(1)
Hi Rana
Hope you are able to fix this. Could you please share your fix here.
Thanks
Sultan Al Arif
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: