Solved
How to Enable a Thing in the code
Hi,
I am trying to create a Thing and assigning a value to the Properties that are inherited from the Thing Template, below is the code.
Resources["EntityServices"].CreateThing({
name: "testfty" /* STRING */,
thingTemplateName: "testfty.TT.testfty" /* THINGTEMPLATENAME */,
projectName: "comP" /* PROJECTNAME */,
});
Things["testfty"].Enable();
Things["testfty"].Restart();
Things["testfty"].Property1= 32;
Things["testfty"].Property2= 56;
But I am getting the following error:
Error executing service addSensor. Message :: TypeError: Cannot find function Enable in object com.thingworx.things.ConfiguredThing@a3e81bb. - See Script Error Log for more details.
Thanks,

