NAV Service Tier management tool for NAV 2009 R2

Today I have finished first version of my remake of the NST Management application. Now, completely done inside NAV!

I wanted to test the DotNet interop in NAV 2009 R2, and I have found, that it works, and it works without any problem! Because I already knew what I needed to do the NST management, it was easy to replicate the app from C# into C/AL. If you look at the code, it is easy! Just few lines of code to read all available SQL server, to read databases on the SQL server, to show folder selection dialog, to read and modify XML file, to run external command and wait for result, to read list of services, start and stop them etc. You can be inspired with that for your own management tools.



Usage of this tool is only on your own risk. There are no checks if you are removing default services etc. but you can add them if you want.


I hope that it will help you to adopt the new RTC with all the cool features in it, and that it will be much easier for you to maintain your infrastructure.

The objects could be downloaded here.



Admin permissions on the managed server

Sending SMS from Dynamics NAV with 5 lines of code

After long time, I have found few minutes (ok, hour and something…) to test one idea I had. It is not long ago, when we switched our Exchange from older version to version 2010. Because I am using Windows Mobile 6.5 on my phone, I have noticed the new possibility to synchronize SMS from/to mobile with exchange/outlook. Bingo! If I am able to create the item in outlook from within NAV (and yes, I am able, I can create emails etc.), I can send SMS from NAV in this way. Easy!

What you need:

Outlook 2010

Exchange 2010

NAV (any version supporting automations…)

Mobile phone with Windows Mobile 6.1 (with some update) or 6.5


Step 1

Setup the mobile to synchronize all with the exchange, mainly the SMS. Just follow standard procedure, this blog is not about setting up the mobile phone…

Step 2

Create code in NAV, which will send the SMS. It is easy:

SendSMS(ToNumbers : Text[30];Body : Text[1000])

  if ISCLEAR(OutlookApp) then

  MobileItem := OutlookApp.CreateItem(11); //11 – SMS, 12 – MMS
  MobileItem.”To” := ToNumbers; //e.g. +420666777555
  MobileItem.Body := Body;


OutlookApp    Automation    ‘Microsoft Outlook 14.0 Object Library’.Application   
MobileItem     Automation    ‘Microsoft Outlook 14.0 Object Library’.MobileItem   

Step 3

Call the function where you need. You need to just run it under profile, which have outlook set to syncing SMS with phone. It will create the sms, and after the sms is synced into the mobile phone, the mobile phone will send the SMS for your wherever you want. If you want to have central sending machine, use the NAS or WebServices to send SMS based on some queue…


As you can see, you do not need to pay for some 3rd party service. You only need some mobile phone with good tarif. Of course, this is not good solution for some bulk sending, but for some standard notifications it is suitable.

Do not forget to make some maintenance of the outlook account, like deleting old sent items etc. You can do it through some code in NAV or may be somehow on the exchange.

And yes, you can read the incoming sms in similar way, just read the items from the outlook.

Some examples of usage:

Sending SMS to admin when session limit is reached (using NAS).

Sending SMS to customer when order is prepared to ship.

Generally: sending SMS when <some action> in NAV happen. 🙂