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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

How to create a suborganization via service??

wposner-2
14-Alexandrite

How to create a suborganization via service??

Does anyone know how to achieve this?

The following code always only seems to create a top level org even though there is an org called MainOrg that I want this new org to exist under:

var params = {

   topOUName: "MainOrg" /* STRING */,

  name: "suborg1" /* STRING */,

  description: "suborg1 /* STRING */,

  topOUDescription: undefined /* STRING */,

   tags:  /* TAGS */

};

Resources["EntityServices"].CreateOrganization(params);

Further, how would I create an org two levels down?  So if I have MainOrg and I add suborg1, how do I add a new org underneath suborg1?

ACCEPTED SOLUTION

Accepted Solutions
wposner-2
14-Alexandrite
(To:wposner-2)

Figured it out:

var params = {

    parentName: "suborg2" /* STRING */,

  name: "suborg2" /* STRING */,

};

Organizations["suborg1"].AddOrganizationalUnit(params);

View solution in original post

1 REPLY 1
wposner-2
14-Alexandrite
(To:wposner-2)

Figured it out:

var params = {

    parentName: "suborg2" /* STRING */,

  name: "suborg2" /* STRING */,

};

Organizations["suborg1"].AddOrganizationalUnit(params);

Announcements


Top Tags