Using simple form -> the item table in the database has 3 fields with primary key on them but do not use identity seed (or autoincrement).
The fields are itemID, itemversionID, itemrevisionID, then there are about 10 fields that follow.
I define an unused field as the primary key.
When the Copy feature is used in simple form, the form reloads without the itemID and upon save, the itemID becomes zero.
So, my question is: Is there a way to bybass Primary Key when using the Copy feature in simple form?
[ATTACH=CONFIG]n80700[/ATTACH]
[ATTACH=CONFIG]n80701[/ATTACH]
Maybe you can asign a value to field in onload or onbeforeinsert event?
{Field_key1} = [global_var1];
{Field_key2} = [global_var2];
Yes! That works by putting it in onload event. Thank-you for your help!. I was able to make the itemID and itemversionID primary keys again as well.
Remember to use the Macro for validar if the record is new.:
if (sc_btn_new)
{
{Field_key1} = [global_var1];
{Field_key2} = [global_var2];
}
Thanks for the tip, that will help!