Tip #14 – Autoincrement Interaction Log Entries

Tip #14 – Autoincrement Interaction Log Entries

Interaction Log entries are a very powerfull feature of Dynamics NAV. From everywhere in NAV you can add an interaction log entry if you print a report and from withing the CRM part of NAV you can register all other interactions like emails, phonecalls, mailings etc.

Interactions can be related to a path of multiple to-do’s that can be sinchronised with Outlook.

Technicaly the interaction log entry table is clustered by an entry no. Like al Entry tables in NAV this handled manualy by C/AL code. This means that every time someone creates a new interaction log entry, the last record in the table is locked, thus isolating all transactions creating a new record.

SQL Server can also maintain the entry number for you. This is built in technilogy called Identity Insert.

To activate this feature for a NAV table change the property Auto Increment of the field.

Every table can have one field with this feature. This can be (part of) the primairy key or not.

If you enable this field you will encounter two typical issues. The first issue you will notice is that if you create a new entry the value of the autoincrement field has to be set to zero. The other issue is that if an error occurs during the transaction, the entry number will be skipped, leading to gaps in the numbering.

If the latter is not a functional issue then the first can be solved by rewriting some code. For Interaction log entries this is just two places. I will let you figure out those places yourself. Stick out tongue

NAV2013R2 | Extend Excel Buffer

With the introduction of Microsoft Dynamics NAV2013, a discussion started around the flexibility of the Excel buffer.

Until 2013, the Excel buffer table used automation libraries directly which allowed C/AL developers to add features without a lot of hassle.

Now with 2013 Microsoft implemented the use of DotNet Interop, but since NAV cannot directly use the office libraries, a wrapper was shipped.

This wrapper limmits the possibilities of C/AL developers to add features.

I am very happy to announce that Microsoft has listened and will implement the most used featutures to the Excel buffer in a future version and they have released a codeplex project to downgrade them to 2013 (r2).

The codeplex project can be found here:

https://nav2013r2openxml.codeplex.com/

My plan is to wrap all the changes into a new Excel buffer table and put the dll on Mibuso, but at the moment I am terribly occupied, both at work and at home. I did not want to withhold you from the news that the codeplex download is available.

Have fun.