How to insert rows via backend and keep relationship among tables

Hello,

We are looking on information on how to insert new records and how to track the relations among them.

We could not find sequences, triggers or procedures that could point us in the right direction on how to add id’s

Also is there any other way to upload Contacts without using the import wizard functionality.

Thanks in advance for your help,

Regards,

If you look at the database you will see there are join tables between the tables that are related. An example is accounts_contacts which contains the cantact_id and account_id for the related records. This is all handled by the underlying php framework when saving records etc

The ids are generated by the framework on save if you wanted to manually import records into the database then you would have to create the id’s your self and also create the related records in the join tables.

There is no other way than the import wizard unless you write a custom script that uses the sugar bean framework to save all the records.

maybe this will help:

http://developer.sugarcrm.com/2012/03/23/howto-using-the-bean-instead-of-sql-all-the-time/

Thanks for all the information Andy, it will help me a lot on creating/updating record using either bean or manual backend statements.

Regards,

Aaron