Skip to main content
13-Aquamarine
Apr 26, 2023 11:09 AM UTC
Question

Things.myService not working

result = Things["someThing"].myService({parameter1: "String"}); this is not working

 

 

5 replies

17-Peridot
Apr 26, 2023 1:23 PM UTC

Hello,

 

Have you taken a look in your script or application log to see if there is any errors?

You can find them here:

jensc_0-1682515347980.png

 

Alternatively, if you get an error message in the output of the service where you are trying to run this code, that could also help us find a solution to your problem.

The error might look something like this:

jensc_1-1682515406881.png

 

Regards,

Jens

Translate
13-Aquamarine
Apr 26, 2023 2:03 PM UTC

var params = {
name: "hari"};

result = Things["DELBI_Scheduler_Test"].myService(params);

Async Execution Failed in Mailserver_google_DynamicServicesCreate [Execution error in service script [DynamicServicesCreate] :: Thing Template [null] does not exist]

Translate
17-Peridot
Apr 27, 2023 6:04 AM UTC

Hello,

 

I haven't really used this "DynamicServicesCreate" service. But it seems like perhaps you are sending it a thing template that doesn't exist.

Could you paste the code of your "myService" service here?

 

Also, when pasting code it is better to use the "Insert/Edit code sample" function of the forum which you can find here under the three dots:

jensc_1-1682575346782.png

Pressing them will reveal some more options where one is the Insert/Edit code sample:

jensc_2-1682575401144.png

If you press it a popup will show up where you can select what type of code you want to paste.

Select Javascript and then paste your code in it. Sometimes you will have to format it a little bit to make it more readable, but most of the time it is better than just the pure forum text.

 

Regards,

Jens

 

Translate