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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Setting visibility of individual entities programmatically

khayes1
13-Aquamarine

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

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

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"

});

khayes1
13-Aquamarine
(To:CarlesColl)

Hi Carles,

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

Kieron

Top Tags