I'm using Google Scripts to maintain a list of Chrome devices on our domain.
I'm using the AdminDirectory.Chromeosdevices.list
method to get all the information I require and write it to a sheet.
I am then trying to write a script to write information to the annotatedLocation
and annotatedAssetId
fields using the Chromeosdevices.update
method.
My problem: I receive a phrase error using the following, from looking at the suggestion: update(resource, customerId, deviceId, optionalArgs)
I don't seem to have a 'resource', I cannot seem to find any way to get this value.
Any suggestions as to how I can get the resource??
var options = {
"annotatedAssetId": (data[i][13] == "") ? data[i][3] : data[i][13],
"annotatedLocation": (data[i][14] == "") ? data[i][4] : data[i][14],
"notes": (data[i][15] == "") ? data[i][7] : data[i][15],
"orgUnitPath": (data[i][16] == "") ? data[i][15] : data[i][16]
}
var device = AdminDirectory.Chromeosdevices.update(data[i][11],"my_customer", data[i][10], options)
Thank you