Hi all,
I try to delete all data in my customized table in the OnAfterGetRecord trigger of a form. But Navision does not permit me to do this saying
You cannot make any changes in the database until a transaction has been started.
How can I persuade it?
Cem Karaer @ Pargesoft
Dynamics NAV Developer since 2005
0
Answers
You cannot persuade NAV to do it in this way...
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Because the routine requires deleting and populating a normal table, a transaction begin is required. But the form triggers which will make the refreshment does not begin a transaction.
Help!
Dynamics NAV Developer since 2005
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Dynamics NAV Developer since 2005
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Dynamics NAV Developer since 2005
This is the code you need to use in the subform for running it on a temptable:
Form - OnFindRecord(Which : Text[1024]) : Boolean Form - OnNextRecord(Steps : Integer) : Integer
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
We had to use this in order to make it so that users could copy/paste data from one sales order to another, as it was a requirement. It works wonderfully thus far...let's hope it stays that way .
- Scott
Vice President, Deployment Operations
Symbiant Technologies, Inc.
http://www.symbiantsolutions.com
Dynamics NAV Developer since 2005
In some triggers (see my previous post), you need to put some code (see my previous post) so it works on a temptable. The only thing you need as extra is to fill up the temptable. For this you need to create a function called by the main form with parameters as to which data you need in the temptable.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Dynamics NAV Developer since 2005