[SOLVED]Editing a Primary Key field Error

When trying to edit a field that is a primary key I receive an error message from scriptcase stating “Error updating database, record not found”. However, when I click the Cancel button the change I tried to make saves without error.

The field is set to be able to edit/update in the database. I also can update it without error through phpmyadmin. I am running a mySQL database version 5.5.16. Please help :slight_smile: Thanks!

Re: Editing a Primary Key field Error

Hello,

I have just reported this issue to our bugs team for further testing.

regards,
Bernhard Bernsmann

Re: Editing a Primary Key field Error

Any word on this one yet? Thanks :slight_smile:

Re: Editing a Primary Key field Error

Hello,

I have contacted our development team asking for the bug status. If you wish, you can also open a ticket on our support system to get more frequent updates regarding the bug.

regards,
Bernhard Bernsmann

Re: Editing a Primary Key field Error

Hello,

After contacting our development team I found out that it is actually SC that doesn’t allow updates on primary keys.

I have also sent as a suggestion that forms should update primary keys. If you wish, you can also send the suggestion to suggestion@scriptcase.net

regards,
Bernhard Bernsmann

Re: Editing a Primary Key field Error

Thank you for your help and information :slight_smile:

How Can i assign a value to a filed that is primary key?

I have a form with 2 fields as primary key (filed1 and field2), field1 is a foreing key for my form master-detail and field2 is a field that count the records created.
For example:
Master
field1
1

Detatil
field1 field2
1 1
1 2
1 3

The question is how can i generate the value for field2? (i tried onbeforeinsertrecord) assign a value through of a function, but SC not alow do it.