you cannot set the value of the primary key column in the details table, you should use a foreign key column instead.
it looks like you have the fid column in the details table for this.
Using DataAssist insert record, the ID is stored in a session variable. On the first page, see the session variables section.
make sure the Insert to the Users table occurs before the insert to the details
in the insert to the details, set the fid column to use the session created by the Users insert