Update Predefined Collections using server script

Hello

I am trying to update the PREDEFINED COLLECTION DEVICES using SERVER CODE SCRIPT.

The problem is I do not know how to access the predefined collections. I am running the code manually once and a while and I am not concerned about security)

This is my current code.

//Name of the collection that you are targeting
var collection = "Devices";
var dbId = "5...";

var token = '5....';

var result = Collection.multiUpdateObject(dbId, collection, '{channels: "OLD"}', {"channels ":"NEW"});

Apperyio.response.success(result, "application/json");

This is my ERROR MESSAGE
Error code SCSE014: Script execution failed. Details have been added to Trace tab.
1 person has
this question
+1
Reply