Skip to main content
1-Visitor
June 28, 2021
Question

Checking for a sub unit from an organization

  • June 28, 2021
  • 1 reply
  • 653 views

Hi ,

 

I have to find out if a particular sub unit is available in the given sub-Organization through service. Suppose I have a sub unit name as 'B' and I have to check if the particular sub unit is available in organization 'Alphabet' or not . I have to check this through a service. Pls guide me through this.

 

Thanks in advance

 

1 reply

16-Pearl
June 29, 2021

Hi,

 

Here's how I would implement it.

Create a service with 2 input parameters called orgName and subUnitName.

 

In the body call below service to return a Boolean result telling me if a sub unit is available in an organization or not.

 

let result = Organizations[orgName].IsInOrganization({
    name: subUnitName /* STRING */
});