ISOrgMember.AddEntityId

Description

This function adds an entity to the organisation node.

Syntax

object.AddEntityId(aSource, aIdentifier, aValue)

Part Attribute Type Description
object Required
The object always implements the ISOrgMember interface
aSource In, Required
string
The entity source
aIdentifier In, Required
string
The entity identifier
aValue In, Required
string
The entity value

Return Value

ISEntityID

Returns the added entity.

Example

Add two entities with the identifier "My identifier3" to the organisation node. Get the entities with the specified identifier and display their count.

Dim aFilter
Dim aOrgMember, aOrgMembers
Dim aTr
Dim aEntityCollection
Dim aMessage

aIdentifier = "My identifier3"
Set aFilter = Profile.CreateOrgMembersFilter

set aTr = Profile.StartMapTransaction
set aOrgMembers = Profile.LoadOrgMembers(aFilter)
for each aOrgMember in aOrgMembers
  aOrgMember.AddEntityId "My source  1", aIdentifier, "My value A"
  aOrgMember.AddEntityId "My source  2", aIdentifier, "My value B"
next  
aTr.Commit

set aTr = Profile.StartMapTransaction 
set aOrgMembers = Profile.LoadOrgMembers(aFilter) 
for each aOrgMember in aOrgMembers
  set aEntityCollection = aOrgMember.GetEntityIdByIdentifier (aIdentifier)
  aMessage = aMessage & vbNewLine & aOrgMember.Name &_
    " has " & aEntityCollection.Count & " linked entities "
next 
 
aMessage = _
  "The number of the org nodes is " & aOrgMembers.Count & vbNewLine & aMessage      

Profile.MsgBox(aMessage)   
Note:

In Profile Client v8 on User Interface Entity Identifier can be found in Organisation > People & Places > Organisational Structure > Open the selected node > Registry > Identifier.

Version information

Added in v7.8.0