Public Sub AddGuestToParticipant()

   Dim oGuest As CParticipant

   Set oGuest = New CParticipant


   With oGuest

       .Init REApplication.SessionContext

       .Fields(Participants_fld_Type) = "Guest"

       'The below value represents the system record ID of the event

       .Fields(Participants_fld_EventID) = 8

       'The below value represents the system record ID of the participant

       .Fields(Participants_fld_GuestOf) = 90

       .Fields(Participants_fld_KeyIndicator) = "I"

       .Fields(Participants_fld_FirstName) = "John"

       .Fields(Participants_fld_LastName) = "Doe"



   End With


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