Skip to main content
17-Peridot
November 22, 2021
Question

Add Visibility Permission - Thingworx 9.1

  • November 22, 2021
  • 2 replies
  • 1137 views

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

16-Pearl
November 22, 2021

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.

5-Regular Member
November 23, 2021

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