Failed to insert a record via a Screen.

During the export of our legacy Issue Tracking system into HR.Net, I faced a problem that looks like this:

Error on Insert Record

Error on Insert Record

The error was saying that something inside HR.Net do miss field called NOTENO in table ISSUENOTES.

During the export of the information, I had to create this field that contained number of a note and this was a primary key in MySQL database. I have changed primary key to be GUID and deleted NOTENO. From my past experience I knew that deleting fields in HR.Net was bad and lead to different kind of errors. This is the case.

DONT EVER DELETE FIELDS FROM HR.NET TABLES!! you hear me?? )

I just hoped to get away with deleting extra filed.. but never managed.

First I tried to resolve the problem myself. I’ve recreated the screen which gave me the error – no luck. Remade the underlaying screen.. and nothing changed. And then 5pm hit my clock and I went home.

Next morning I spent 30mins on the phone with Vizual trying to resolve the problem. The support engineer has done the same steps: recreated the screens.. and guess what? nothing changed -) The guy tried different combinations of screens, recreated almost the entire system from the scratch.. and nothing changed.

At the end we remembered that we have triggers on this table. One of the triggers looked like this:

Problematic Trigger

Problematic Trigger

If you notice, this trigger has no fields to be run on. Normal trigger has at least one field that it is triggered on. I suppose that NOTENO field was here (before I deleted it from the table) and that has been causing the trouble.

We deleted this trigger and the problem was resolved. So every time you run into similar kind of problem, check your triggers!

This entry was posted in Admin Console and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *