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:
NAV (any version supporting automations…)
Mobile phone with Windows Mobile 6.1 (with some update) or 6.5
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…
Create code in NAV, which will send the SMS. It is easy:
SendSMS(ToNumbers : Text;Body : Text)
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
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.
Today I have for you something, what everyone wants to have, but it was nearly impossible to create. After you see it, you will know why. I prepared it for you in more formats. You can look at it as PNG file, you can walk through it with some VRML viewer, you can open it as Visio file. You can read it and import it as CSV file. You can browse it as HTML file. You can view it as SVG file. It is on you, how you will visualize the result. I must say, I have tried many ways, but in most cases the tools were weak and my 2GB of RAM was not enough.
What’s the hell is this “line hell”?
Ladies and Gentleman,
“Big Picture of NAV” is there. You can download the files on the “The Art of NAV” project page. And what the files are about? The files are generated from data, describing ALL NAV TABLE RELATIONS WITH CONDITIONS AND FILTERS. In the visualizations, the tables are represented by boxes where first line is table name and rest are all fields in the table. The relation descriptions are part of the edge text (source conditions, target filters). All is based on NAV 5.00SP1 W1 objects. When you take the result files and you will want to print it in 1:1 scale, the output will be over 5×5 meters in size. Visio cannot save the diagram as bitmap for 1:1 scale (it seems because the size). You cannot see whole diagram in Visio (on common display resolution), because zoom cannot be less than 1%. My computer had problems to generate any graph from the sources. My 3GHz Core 2 DUO worked on it many minutes. I have used the excellent software Graphviz to make the graphs, but as you can see, it is too much for any tool on the world to make some nice readable chart (or I didn’t find the correct settings :-)).
I prepared for you NAV objects, which I used to extract the relations from object text file. It will fill the NAV table with all necessary data and you can browse it in prepared window. You have list of all fields in the database on top, related tables for selected field in middle, and fields relating to the selected field on bottom. You need to use these objects on the database, from which the object file is created, because the form is based on the virtual tables of the database. The objects are extracting 100% of relations in the database, which are defined. You can use them to extract relations from you own databases. Just export all tables as text and run this tool in the same database.
All files can be found in the download section of project “The Art of NAV“.
Do you understand now, why we do not have any official diagram with the NAV table structure?
File description and viewers I tested:
SVG – vector format – ZGRViewer – sometime needs to set bigger java heap by adding parameter “-Xmx512m” (the size is on you, this example is 512MB) when calling the java package
HTML – HTML exported from MS Visio – Internet Explorer – use the Internet explorer, you can search within the graph. Firefox is showing just plain bitmap.
VRML – the graph in 3D world – FLUX Player – needs big memory, you can look at the graph in 3D space and if you use the FLUX studio, you can add cameras, interactivity, animations etc. Welcome into “NAV Space”.
VSD – MS Visio file created by importing the SVG file – MS Visio – You can look at the graph in Visio and print it from there (over 5×5 meters). Hart to edit etc. because the size and SVG source limitations…
That’s the question… Many rookies have problems with decision where to put the code (or from where to call it). When you watch some beginner in NAV where the code is placed and from where it is called, you can find out that in many cases used triggers are the triggers, which in 99% are not used in the application and many Pro developers nearly do not know what the triggers are doing :-).
I had a thought. To create small decision tree which can help developers to find out, which trigger will be best for calling the code, and where to place the code in (table, codeunit etc.). I placed the first file to google code repository site under project named “The Art of NAV“. I will try to keep this site as the Home page of this project. We will see, maybe I will find better tool for that.
I am waiting for your opinions and comment. I will try to keep the project live and up to date. We will see, if it helps you.
This is a first step I am doing and I am thinking about it as an initial step for something I am calling “NAV Art” or “The Art of NAV”. My target is to help all developers to make the code as clear as possible and make some order in the NAV word. Of course, there is no simple manual or something for that, but I want to open some discussion about that and give some ways for the specific problems. I hope that I am not alone in that and you all will try to participate in this.
I am Waiting for your comments…