>> There is any options before to write on disk to get the value of primary key ? This way I will prime my ID at the end.
No, the primary key value is created by the insert.
You can use the PostInsert / PostUpdate routine to change the record if you like, but you should fetch the record, change it, and write it back yourself. (The ID will be primed at this point for TPS, and also for SQL if you have the necessary Clarion support for priming auto-inc fields turned on for SQL.)
Cheers
Bruce