NAV TechDays 2015 wrap up

  • Post comments:6 Comments
  • Reading time:3 mins read

Another NAV TechDays is over, and this one was the best so far. 950 people from all over the world all passionate about NAV and technology and eager to learn and share and discuss the latest in NAV. It was amazing, Luc did a great job again, and I am looking forward to the next year, hoping this conference makes it beyond 1000 attendees.

This year I have delivered a yet another “Black Belt” session named “Client Add-ins Black Belt: bringing .NET and JavaScript together” and as promised, I deliver the session material here on my blog.

(more…)

Continue ReadingNAV TechDays 2015 wrap up

Out-of-transaction database writes

  • Post comments:7 Comments
  • Reading time:4 mins read

Ancient wisdom goes that you cannot have more than one write transaction going on at the same time in a single session in NAV.

This is absolutely true, in and out.

Some features, like Activity Log, will leave you wanting to be able to write to the database outside of the normally running transaction.

Wouldn’t it just be beautiful if you could:

  • Write to the database, and then persist the change to the database even if an error happens during the transaction? (without cough! TryFunction, cough! cough!);
  • Not cause any locks to remain at the target table for any longer than it takes to do the write itself, without having to call COMMIT on your “regular” transaction; and
  • Not use temporary tables, because a system error (however unlikely) could cause the data to not be persisted if crash happens before temporary table is flushed to the physical one.

Well, in fact, you can do this.

(more…)

Continue ReadingOut-of-transaction database writes

Activity Log or Activity Lock pattern?

  • Post comments:5 Comments
  • Reading time:5 mins read

Today at NAV TechDays 2015 in Antwerp, I attended a presentation by Nikola Kukrika, Ciprian Iordache, and Gary Winter, at which Ciprian presented a new design pattern based on a new feature in NAV 2016: Activity Log.

In a nutshell, this new feature, and thus the design pattern, aim at helping trace issues and facilitate troubleshooting by leaving information in the database about what was done, by whom, if it failed, and if it did, why.

All pretty and nice, but – as Ciprian pointed out – there is a bad aspect about it: when an error happens, and everything is rolled back – the activity entry is rolled back together with everything else. Nikola later explained how this could be solved through writing into temporary tables, but this either requires redesign by Microsoft or special coding techniques by you.

However, there is a bigger caveat than this. Non-persisting data in case of errors is a problem, but the bigger problem lies elsewhere. Let me explain that bigger problem here, and then give a silver-bullet solution to solve it all.

(more…)

Continue ReadingActivity Log or Activity Lock pattern?