Public Sub AddIndRel()

'Load Robert Hernandez

Dim oCon As CRecord

Set oCon = New CRecord

oCon.Init REApplication.SessionContext

oCon.LoadByField uf_Record_CONSTITUENT_ID, 96

Dim lId As Long

lId = oCon.Fields(RECORDS_fld_ID)

'load Joseph Diresta

Dim oCon2 As CRecord

Set oCon2 = New CRecord

oCon2.Init REApplication.SessionContext

oCon2.LoadByField uf_Record_CONSTITUENT_ID, 1

Dim lID2 As Long

lID2 = oCon2.Fields(RECORDS_fld_ID)

Dim oIndRel As CIndividual2

Set oIndRel = New CIndividual2

With oIndRel

   .Init REApplication.SessionContext


   .Fields(ORGANIZATION2_fld_CONSTIT_ID) = lId




End With


Set oIndRel = Nothing


Set oCon2 = Nothing


Set oCon = 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.