Public Sub UpdatePosition()

   Dim oOrgRelations As COrganizations2

   Dim oOrgRelation As COrganization2


   'need to open the collection then loop through the instances

   Set oOrgRelations = New COrganizations2


   '280 is the system record id for the constituent in which Org relationships

   'to loop through

   'tvf_Org2_PrimaryBusiness just opens the Primary Business from the Bio 1 tab -

   'if you need to loop through all org records to find the right on just leave

   'this parameter out

   oOrgRelations.Init REApplication.SessionContext, 280, tvf_Org2_PrimaryBusiness


   For Each oOrgRelation In oOrgRelations

       oOrgRelation.Fields(ORGANIZATION2_fld_POSITION) = "Test"



   Next oOrgRelation

   Set oOrgRelation = Nothing


   Set oOrgRelations = Nothing

End Sub

Disclaimer: We provide programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes you are familiar with Microsoft Visual Basic and the tools used to create and debug procedures. Our Customer Support can help explain the functionality of a particular procedure, but we will not modify, or assist you with modifying, these examples to provide additional functionality. If you are interested in learning more about the VBA and API modules, contact your account manager.