Hello,
When a user table is created SAP add 2 fields ( Code and Name ) automatically. Code seems to be the primary key. But when filling the table does it exist a way to have an automatically id for this code field.
Do I have to generate by code an id ?
( I thought it would be easy but code is 8 characters type not enough for me !)
Thanks,
Romeo.
Hi,
the field length of the udf code field will be changed from 8 to 20 characters in version 6.7. This should help with development.
kind regards
Jacintha Murphy
Business One SDK Support
Hi,
Are you talking about filling the table from inside SBO?
I don´t think is possible the ID to be filled automatically.
Have you try to use a formated search? I think would be possible to get previous ID from the matrix and define next value, all of it in the select clause.
It´s only an idea, but could work.
Regards,
Ibai Peñ
yes those fields are required and must be unique, what we have done in the past was just either have the code you are writing manage the autoincrementing of them or use some hybrid number off of a datetimestamp. and then put another userfield on the table and manage your true key on that field. not the best way but it works, not really sure what the sap guys were thinking when the made it function that way, maybe if they are reading they can post how they envisioned it to work.
Add a comment