cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Trouble Using EnableSubscription() Service

Ascherer17
15-Moonstone

Trouble Using EnableSubscription() Service

I am trying to enable some subscriptions on a Thing programmatically on ThingWorx 8.4.0.   I wrote a simple service that calls the EnableSubscription service, but it keeps giving me the error: 

Message :: Cannot Update A Subscription That Does Not Exist! - See Script Error Log for more details.

 

Here's an example setup in which I get the error:

Thing: 'DummyThingEntity'

Property on DummyThingEntity: 'TestNumber1'
Subscription on DummyThingEntity: 

Name: 'Foo'

Event: 'DataChange'

Property: 'TestNumber1'

The subscription simply logs a debug message.

Service on DummyThingEntity: 'Ensub'

 Code: 

me.EnableSubscription({
	thingName: me.name /* THINGNAME */,
	eventName: "DataChange" /* STRING */,
	propertyName: "TestNumber1" /* STRING */
});

 

Do I have something incorrect in the 'EnableSubscription()' snippet? 

 

 

ACCEPTED SOLUTION

Accepted Solutions
posipova
20-Turquoise
(To:Ascherer17)

2 REPLIES 2
posipova
20-Turquoise
(To:Ascherer17)

Please refer to this article: https://www.ptc.com/en/support/article?n=CS271414

slangley
23-Emerald II
(To:Ascherer17)

Hi @Ascherer17.

 

If the response proivded by @posipova resolved your issue, please mark it as the Accepted Solution for the benefit of others with the same question.  If you still have issues, please let us know.

 

Regards.

 

--Sharon

Announcements


Top Tags