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

Setting visibility of individual entities programmatically

SOLVED
Amethyst

Setting visibility of individual entities programmatically

Hi,

does would anyone know which service to use to set the visibility on an individual entity. If you could provide an example that would be great.

Currently I create networks, things and organisations and organisational units programmatically using data from a mashup. I would also like to be able to set the visibility of the things & networks at the same time, but can't seem to find a suitable service. I have seen discussions concerning 'collections' but I want to set it on an individual basis.

Thanks,

Kieron

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Setting visibility of individual entities programmatically

Hi Kieron,

To set visibility of one Organizational Unit at Thing's level:

thing.AddVisibilityPermission({

     name: "principalName", // -- like: "OrganizationName:OrganizationUnitName"

    type: "OrganizationalUnit"

});

If you want to set it for Organization at Thing's level:

thing.AddVisibilityPermission({

     name: "principalName", // -- like: "Organization"

    type: "Organization"

});

View solution in original post

2 REPLIES 2

Re: Setting visibility of individual entities programmatically

Hi Kieron,

To set visibility of one Organizational Unit at Thing's level:

thing.AddVisibilityPermission({

     name: "principalName", // -- like: "OrganizationName:OrganizationUnitName"

    type: "OrganizationalUnit"

});

If you want to set it for Organization at Thing's level:

thing.AddVisibilityPermission({

     name: "principalName", // -- like: "Organization"

    type: "Organization"

});

View solution in original post

Re: Setting visibility of individual entities programmatically

Hi Carles,

that's the one, thank you for the quick response, you're a star.

Kieron

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum! ______________________________