ISProvider.GetBU

Description

This function returns the nearest organisation node of type 'Business Unit' the main POS of the selected provider belongs to.

Syntax

object.GetBU()

Part Attribute Type Description
object Required
The object always implements the ISProvider interface

Return Value

ISOrgMember

Returns the nearest organisation node of type 'Business Unit' the main POS of the selected provider belongs to.

Example

Display the nearest organisation node of type 'Business Unit' the main POS of the selected provider belongs to.

Dim aFilter 
Dim aProviders
Dim aProvider
Dim aBusinessUnit
Dim aMessage

Set aFilter = Profile.CreateProvidersFilter
aFilter.Category = 2 'pcProvider
set aProviders = Profile.LoadProvidersByFilter(aFilter)

aMessage = aMessage & vbNewLine &_
  "The number of the providers is " & aProviders.Count

for each aProvider in aProviders
  set aBusinessUnit = aProvider.GetBU
  if aBusinessUnit is nothing then
    aMessage = aMessage & vbNewLine & aProvider.FullName &_
      "doesn't belong to any organisation node" 
  else
    aMessage = aMessage & vbNewLine & aProvider.FullName & " belongs to the " &_
      "organisation node of type 'Business Unit' '" & aBusinessUnit.Name &_
       "'"
  end if    
next
 
Profile.MsgBox (aMessage)  
Note:

In Profile Client v8 on User Interface Main POS can be found in Organisation > People&Places > People and Places > Open the selected Provider > Member Of.

Version information

Added in v7.8.0