ezeitgeist

Creating New Record in Related Table In a Script?

Discussion created by ezeitgeist on Nov 6, 2017
Latest reply on Nov 7, 2017 by ezeitgeist

I have 3 tables:

Meeting Table                    Attendee Table                         Contacts Table

Meeting_ID                         Attendee_ID                             Contact_ID

~All meeting info                Meeting_ID                               ~All contact info

                                           Contact_ID

 

Meeting::Meeting_ID = Attendee::Meeting_ID

Attendee::Contact_ID = Contacts::Contact_ID

 

I have "Allow Record Creation" turned on to created records in Attendee Table from Meeting Table.

 

HOW DO I:

Using a script, after creating a new record in the Meeting table, create records in the Attendee table that pull the Meeting_ID from the new Meeting table?

 

I know I can do it the hard way (Ie. Set a variable $MeetingID from the newly created Meeting record and then go to Attendee table and create new records and add the Meeting_ID in). BUT, I know there is an easier way to create Attendee records from the Meeting table given the Allow Record Creation relationship. I just don't fully understand the scripting steps to make that happen. If I just set the Attendee::Contact_ID while I am in the Meeting table layout, will that do it? If I want to create 2 Attendee records, how would I do that?

Outcomes