Skip to main content
1-Visitor
October 8, 2021
Solved

How to create organization branches via script

  • October 8, 2021
  • 1 reply
  • 1326 views

Is there a way to create organization branches via scripting?

I know I can create top level organization via following snippet:

var params = {
  topOUName: "customer"/* STRING */,
  name: "customer"/* STRING */,
  description: undefined /* STRING */,
  topOUDescription: undefined /* STRING */,
  tags: undefined /* TAGS */
};

// no return
Resources["EntityServices"].CreateOrganization(params);

 

But is there a way to create branches also via script? See attached picture (branch1 & branch2).

Best answer by nmilleson

@randomName ,

 

You can use this service:

 

Organizations["MyOrg"].AddOrganizationalUnit({
	parentName: undefined /* STRING */,
	name: undefined /* STRING */
});

 

Hope that helps

--Nick

1 reply

nmilleson17-PeridotAnswer
17-Peridot
October 8, 2021

@randomName ,

 

You can use this service:

 

Organizations["MyOrg"].AddOrganizationalUnit({
	parentName: undefined /* STRING */,
	name: undefined /* STRING */
});

 

Hope that helps

--Nick