Relationships created by Studio are built in an upgrade safe way, the way its foreign keys are stored in an extra table instead of core table.
So for your scenario, it seems you created an One to Many relationship between Participant and Person, so SugarCRM creates an extended vardefs for Person with the fields:
<relationship_field>_id: pseudo field to store related id
<relationship_field>_name: pseudo field to store related name
<relationship_field>: pseudo field to fetch a list of related records (dev_participant1_dev_linkperson)
And an extended vardefs for Participant with the field:
<relationship_field>: pseudo field to fetch a list of related records
Whenever you create a record from Person you can specify the Participant in 2 ways:
PHP Code:
$person->dev_partic5013cipant1_ida = 'some value';
This will make SugarCRM saves the Participant in the relationship table as soon as you save the $person.
PHP Code:
$person->save();
$person->load_relationship('dev_participant1_dev_linkperson');
$person->dev_participant1_dev_linkperson->add('some value');
This will automatically save the Participant id in relationship table.
Cheers
Bookmarks