Rename error

Dear All,

I have a table in which user validates Quantity field, but doing this the user gets an error “You cannot rename a record because the new value for the following field is ‘0’, field: Line No. Table: Service Line EDMS”. This error doesnt occur always but sometimes only so is there any solution for this??

Thanks,

Suman

Did you checked the code written in that field’s OnValidate trigger.

Hi Suman,

The NAV developers at Microsoft are also human, so it’s possible that there’s a bug in the native code in your database. It’s always possible. But, it’s also possible that the cause of the error was introduced by mistake when merging add-ons into the database, or by subsequent code modifications that exist only in your database.

Somewhere within the call stack that begins in the Quantity validation, it looks like you have a command that is trying to MODIFY the Service Line EDMS record, and one of the primary key values for that record has been changed prior to the modify command. (I would be surprised to see a RENAME command, but that’s also possible.)

I think your best bet is to employ the debugger, and work backward from the line that raises the error, looking for code that modifies the PK values on the Service Line EDMS record. Of course, if you’re familiar enough with the code to know when this error started, and you can associate that time period with any changes made to the application, you may be able to jump the debugger directly to the problem code.

Happy hunting!

Hi George,

Ya I have solved the issue using the debugger and thanks for your reply. There is nothing in the rename trigger.

Happy hunting to you too…

Suman

Hi Suman,

I’m happy to see that you’ve found the problem. I’m guessing it was custom code? If it wasn’t, maybe you could share?

And on the reference to RENAME, I was talking about the command, not the trigger.

Thanks,