Quantcast
Channel: Spiceworks Community
Viewing all articles
Browse latest Browse all 18

Where is the Service State in SpiceWorks API?

$
0
0

The exception will always be accessible by:

alert("exception? " + resultHash['exception']);

had you done that, you would see the error "wrong constant name Service Installations". Names cannot have spaces and they do not end in plural. So, if your class was supported, it would actually be "ServiceInstallation".

And since that is the table you wish to access, you would not have the "include" for it - that would only be if you wanted to tie another table to it.

My advice is to always start simply. Get

SPICEWORKS.data.query( {serviceResult: {class: 'ServiceInstallation'}}, function(results) {
  var serviceResult = results['serviceResult'];
  alert("exception? " + results['exception']);
});

working and then start adding your query condition and growing it from there. Note that you want the exception to be undefined, which means you're doing something properly.

Jackie.


Viewing all articles
Browse latest Browse all 18

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>