dale
Posts: 0
Joined: Fri Mar 29, 2013 5:28 pm

Executing a service via js - no method/property execute

Having an issue where I cannot call a service via JS with .execute.

GeolocationService.execute({});

I get the following errors:
Chrome - Uncaught TypeError: Object [object Object] has no method 'execute'
IE - Object doesn't support property or method 'execute'

Thanks,

Dale.

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

Executing a service via js - no method/property execute

What is the name of your service on the page (in mapping)? You would call:

code
serviceInstanceName.execute ({});
/code

dale
Posts: 0
Joined: Fri Mar 29, 2013 5:28 pm

Executing a service via js - no method/property execute

Ah, wouldn't you know it - I posted this and then a minute later found the solution!

You don't use the service name on LHS, it works if you use the name from the 'datasource' dropdown.

Return to “Issues”