The following code demonstrates adding a reservation contact from inside an B25.FormEventHandler
B25.FormRecord record = form.getActiveRecord();
B25.FormRecordCollection reservationContacts = record.getRelatedRecords('B25__Reservation_Contacts__r');
Id contactId = [SELECT Id FROM Contact LIMIT 1].Id; // just grab a random contact id for this example
Id reservationId = record.getSObjectClone().Id;
reservationContacts.add(new B25__ReservationContact__c(
B25__Contact_Lookup__c = contactId,
B25__Reservation_Lookup__c = reservationId
));
Methods
get(String)
B25.FormRecord get(String UUID)
Gets the record from the collection with the specified identifier.