Chris2656882
Posts: 0
Joined: Fri May 11, 2012 3:47 pm

Calling a service within custom Javascript

• How does one call a service defined with the builder within a custom javascript/Jquery function?
• What is the notation to do so?

•Also, when creating a service with the builder, how do you reference variables that are only stored within custom JavaScript functions and not within form fields?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Calling a service within custom Javascript

code
serviceInstanceName.execute({});
/code

http://help.tiggzi.com/documentation/... (just added this)

Chris2656882
Posts: 0
Joined: Fri May 11, 2012 3:47 pm

Calling a service within custom Javascript

Also, when creating a service with the builder, how do you reference variables that are only stored within custom JavaScript functions and not within form fields?

Chris2656882
Posts: 0
Joined: Fri May 11, 2012 3:47 pm

Calling a service within custom Javascript

Also, when creating a service with the builder, how do you reference variables that are only stored within custom JavaScript functions and not within form fields?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Calling a service within custom Javascript

You would access them in a standard way (if visible), there is nothing special you need to do.

Chris2656882
Posts: 0
Joined: Fri May 11, 2012 3:47 pm

Calling a service within custom Javascript

When calling a service via custom javascript, how can one override the default input parameter values?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Calling a service within custom Javascript

You can use mapping to set or overwrite any default input parameters values. Another option is to use a Generic Service: https://getsatisfaction.com/tiggzi/to.... You should have access to request params from: this.__requestOptions. One thing to note is that you will still need to map these request parameters, otherwise they will not appear in the requestOptions object.

RobertJay
Posts: 0
Joined: Fri Jun 15, 2012 1:32 pm

Calling a service within custom Javascript

How can that be modified so that I can execute some code when execution is successful. Or even better, http://snippees.com/viewSnip.php?snip... looks like great code - it it can be tweaked to work.Thanks.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Calling a service within custom Javascript

Hi Robert,

You can control the service success event:
:: http://devcenter.appery.io/documentat...

RobertJay
Posts: 0
Joined: Fri Jun 15, 2012 1:32 pm

Calling a service within custom Javascript

I've been there a dozen times and do not see how I can modify Max's code to control the success event. Can you please take a screenshot of what I am missing. Thank you.

Return to “Issues”