I set a range on a field, then call deleteall(true) on the record, and I’m kicked out of NAV whether I do this through the client or through code. The records are not deleted.
However, if I pick just a single record and run delete(true), I have no problems. Does anyone have an explanation? Has anyone seen this before?
I noticed something else. When I try to detele certain records from the table, my session gets killed. Every time I try to detele those records I get kicked out. For other records, I can successfully delete them.
All of the records were part of a data migration. Any idea how I might try to track down this issue?
Feels to me like you’re having some sort of executable problem, which could also explain your other problem. I would try to re-install NAV and apply the service pack you’re on again. Are you even on an installed instance or running the exe’s out of an uninstalled client folder?
I suffered similar problems, but I thank it was usual… it throws me out of NAV designing properties of a few objects, changing code lines and saving, and many other situations. I thank it happened to everybody, doesn’t it?
I have run into similar problems in table 37. Turned out I had a line number of zero which caused the whole thing (don’t ask how I got a line number of zero, it had to do with a copy document problem).
When you delete a record with a line number of zero it calls the on delete trigger. The on delete trigger has some code that has a deleteall(true). This deleteall(true) calls the on delete trigger again. Which in turn calls it again etc…
Instead of running this loop forever, Navision just shuts down.
What is the table?
What is the line number of the record you are deleteing?
Try debugging and see if you are in a loop in the ondelete trigger