This function returns the nearest organisation node of type 'Business Unit' the main POS of the selected provider belongs to.
object.GetBU()
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISProvider interface |
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)
In Profile Client v8 on User Interface Main POS can be found in
.