Add entry to llx_c_type_contact

Hello,

if a new module needs to add to table llx_c_type_contact the value for rowid has to be set to specific number. Otherwise sql will return an error: Field ‘rowid’ doesn’t have a default value

The column rowid does not have AUTOINCREMENT set, the wiki entry is wrong here https://wiki.dolibarr.org/index.php?title=Table_llx_c_type_contact

How do I know which numbers are OK to use??

Thanks!
David

Hi david, are you trying to insert via a sql client ? (DBeaver, SQLStudio, …) Or are you having issues with dolibarr not being able to insert itself

So i tested inserting a new entry into the table, i got it working fine. You have to watch out as the table has unique values at multiple places. I tried it with a rowid larger than the latest one in the database table and it went in without errors.