Hi all,
Some of you probably saw the error:
You cannot make any changes in the database until a transaction has been started.
This error apperas when you try to insert anything into database in OnInit trigger, or OnURL trigger on the form.
Is this a bug ? or is there any official MS document saying: yes - this behaviour is by design. If it is a bug does anyone report this to MS ?
Regards,
Slawek
Slawek Guzek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
Comments
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
I was so smart to look there, but not smart enough to find anything regarding inserting new data in OnInit or OnAfterGetRecord.
I was smart enough to find on p.277 w1w1adg.pdf an example of C/AL code showing usage of MODIFY in OnAfterGetRecord, which actually doesn't work
I'm wondering if it is an error because NAV throws an error even if one tries to insert/modify the data in the table completely unrelated to the form.
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
That's true in case of OnAferGetRecord. But what about OnInit and OnURL ? And why w1w1adg.pdf says that MODIFY is possibble in OnAferGetRecord :-k
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
What you need is a very very slow connection to the NAV server.
Try connectiing direct over a slow interent connection.
Then open a form with complex captioning. It then becomes clear what it is drawing it what sequence (or use the dubegger but uuurrrggghhh).
Of course it would sometimes be nice to be able to cption a field once you have the record, but I think in balance it would just add too much performance over head to have that ability for the one in 100,000 times that its needed.
:-k
David, could you please be more specific ? I can't figure out to what your answer is related to...
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
My first laptop that I used for many of my Navision impelmentations was a 486 16mhz with 12 meg of ram.
Because it was quite slow, making things go fast were very important to me. (It probably is patially why now I am so good at making NAV systems go fast).
have that computer I saw many things that you never see on a fast computer, and one of them is how Forms are drawn in Navision. So i you have a slow connection to the server you can emulate this slow speed,a nd you can see what is happening when a form opens in slow motion, and see what takes the most time etc.
This can help you understand why they do it this way. using the debugger is not the same because one key stroke of F8 or f5 could be 1 milli second or 1 second you dont know.
Report - OnInit
Report - OnPre
Microsoft has finally solved that problem in hotfix 954722 posted in April 2009.
Exe build number is 5.0.27253.0
Regards,
Slawek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03