Skip to main content
Nov 22, 2021 12:18 PM UTC
Question

Add Visibility Permission - Thingworx 9.1

I am trying to add visibility permission programmatically in thingworx 9.1.

Facing following err:

Message :: TypeError: Cannot call method "AddVisibilityPermission" of null 

2 replies

Nov 22, 2021 9:13 PM UTC

This kind of error appears if the object you are trying to AddVisibility to cannot be found. Check if the entity exists you call the service on.

 

E.g. Things["DoesNotExistInYourInstance"].AddVisibilityPermission(); will fail with the error you experience. But Things["SystemRepository"].AddVisibilityPermission(); will result in an error that parameter is missing.

Nov 23, 2021 5:49 AM UTC

Hi @Sathishkumar_C ,

It seems like the permission have not applied successfully. You can refer the attached article for your reference. 

https://www.ptc.com/en/support/article/CS236180

Feel free to reach out if you still face the issue.

 

Regards

Bhawna