Skip to main content
15-Moonstone
July 6, 2017
Solved

Get Description of Sub Unit

  • July 6, 2017
  • 1 reply
  • 1888 views

Hello,

I have created an organization with 3 Sub Organizations,

Home.JPGtest1.JPG

  

test2.JPG


it's possible to read the description of each of them?

The result I expect is to be able to have as values:

TEST

TEST1

TEST2

I've tried with Org's services. But I can only get the description of the General Information for the Unit.


Thnx


Giuseppe

Best answer by AnnaAn

Giuseppe Fiore​,

To get organization root/sub-unit description,you could use build-in service:

Get root organization description:

var description = Organizations["YOURORGNAME"].GetDescription();

To get sub-unit descritption:

var params = {

name: "SUB-UNIT-NAME" /* STRING */

};

// result: STRING

var result = Organizations["YOURORGNAME"].GetOrganizationalUnitDescription(params);

Hope it helps,

Br,

Anna

1 reply

AnnaAn14-AlexandriteAnswer
14-Alexandrite
July 7, 2017

Giuseppe Fiore​,

To get organization root/sub-unit description,you could use build-in service:

Get root organization description:

var description = Organizations["YOURORGNAME"].GetDescription();

To get sub-unit descritption:

var params = {

name: "SUB-UNIT-NAME" /* STRING */

};

// result: STRING

var result = Organizations["YOURORGNAME"].GetOrganizationalUnitDescription(params);

Hope it helps,

Br,

Anna

15-Moonstone
July 7, 2017

Hi Anna,

Thanks for the answer, but I do not find that function, I expect the version of thingworx used is 7.4 .


this is the msg of error.


Cannot find function GetOrganizationalUnitDescription in object com.thingworx.security.organizations.


Thnx

Giuseppe


14-Alexandrite
July 10, 2017

Giuseppe Fiore​,

I tested this with 7.4.0 too.

Could you test again with Administrator user or other user which belongs to Administrators Group?

If it worked, it should be related to the user permission issue.

Thanks,

Br,

Anna