ISProvider.CreateAlias

Description

This function returns the provider's alias with the specified code or creates it if the alias does not exist.

Syntax

object.CreateAlias(aAlias)

Part Attribute Type Description
object Required
The object always implements the ISProvider interface
aAlias In, Required
string
The alias of the provider

Return Value

ISProviderAlias

Returns the added alias to the provider.

Example

Add a new alias with the selected code to the provider.

Dim aFilter 
Dim aProviders
Dim aProvider
Dim aAlias
Dim aMessage

const aAliasCode = "WCB"

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 aAlias = aProvider.CreateAlias (aAliasCode)
  aAlias.Reference1 = "Ref1"
  aAlias.Reference2 = "Ref2"
  aAlias.Reference3 = "Ref3"
  
  aProvider.Save    
  
  aMessage = aMessage & vbNewLine & aProvider.FullName &_
    " has the alias with the code '" & aAlias.Code & "'"
next  
 
Profile.MsgBox (aMessage)  
Note:

In Profile Client v8 on User Interface Alias can be found and added in Organisation > People&Places > People and Places > Open the selected Provider > Reference > Alias.

Version information

Added in v7.8.0