Well, not really "Intelli" as in "Intelli "gent. But still very fast and very helpful.
If you have already browsed my site a little, you will quickly realize that I am still an unchangingly big fan of the C/Side development environment, including the Classic Client of navision.
And, seriously: I don't miss anything with the report generator (you have to see it! No comparison with the RDLC mess of today) or with the actual programming in CSide (C/Side). Ctrl+f12 to get to the function target in the program code? It works! Syntax highlighting in C/Side? It works! Convenient selection of variables & commands? It works! Well... not quite. I've always found the object selection in the Classic Client to be quite cool and fast, but I do miss the auto-complete (“Intellisense”) of C/Side in the newer Navision versions a little in the old version... Nevertheless, everything still works faster than Fortunately, you can also make life a little easier for yourself here!
Ac'tivAid (Active Aid) for the AutoHotKey automation tool for C/Side!
Just use Hot Strings from the ac'tiv Aid Toolbox! You can find the version I use here:
Ac'tive Aid developer version by Michael Telgkamp?
If you are looking for even more information about the Autohotkey tool, you can find interesting places to start here:
Neue Autohokey-Version mit Qt
A good introduction is given in the C't article
What is ac'tive Aid (ac'tivAid, Active Aid, ActiveAid) or Auto-Hotkey? In very short: An easy to program script environment for own tools. Sounds familiar? Exactly! It fits perfectly with our beloved, easy to program script environment Navision and Business Central! 🙂
Screenshot feature in ac'tivAid/AutoHotKey
I also love the screenshot feature of ac'tivAid. For me, it is set so that it simply copies the current window, and opens it directly in IrfanView. There I can easily drag the desired section in full resolution, or get the drawing function with F12 and quickly mark a red box around the interesting area. Practically all screenshots on this homepage were made with it. I haven't found an easier and faster tool until today... . And I have tried many. A bit like Navision / Business Central 🙂 .
Navision or Business Central Hotstrings in ac'tivAid
Back to HotStrings and "IntelliSense" under Navision or Business Central:
I have the worst finger crushers from C/Side (CSide), such as
createdatetime(workdate,time),
strsubstno(‚,
If rec.findset then repeat […] until rec.next = 0;
.
This looks then e.g. with createdatetime(workdate,time) looks like this:
As a result, in any (!) Business Central & Navision, even in the DOS version of Navision (3.53 and 3.56), I can now simply type in the shortcut cdt( , and ac'tivAid turns it into createdatetime(workdate,time). Of course the command cdt does not work under Navision 3.5x, because it does not exist yet. But if you use the DOS-Navision, you need other commands anyway, e.g. dbFINDSET instead of rec.findset etc. Fun fact: Did you know that the development language in the ancient DOS Navision 3.53/3.56 was also already called CAL, in other words practically the AL (Application Language) of today in Visual Studio Code?
However, the principle is the same for both and therefore works in any Navision or Business Central.
I have saved these text modules in the most frequently used variant. For example, createdatetime(workdate,time) has no semicolon at the end. I use Findfirst mostly in the variant If findfirst then…therefore I saved findfirst then . With most commands I use the opening parenthesis with it, even if it does not occur e.g. with FindFirst So I type if rec.ff( und activAid macht daraus in C/Side if rec.findfirst then : the opening bracket is deleted immediately.
Even more special is the construct used a thousand times:
if rec.findset then repeat
until rec.next = 0;
You practically never use rec here. But apart from that, practically every Navision or Business Central C/Side developer has typed this loop thousands of times, for example in this form:
if Cust.findset then repeat
until Cust.next = 0;
(with something in between, of course. And somewhat abbreviated, of course it should be Customer, but “back then” variables in CSide were often abbreviated. After all, one only had 128, later 132, character line length!)
Script functions for Business Central & Navision hotstrings
Here I use the script functions of HotString from the script collection ac'tivAid for the runtime AutoHotKey:
Send ^{left}
Send {CTRLDOWN}{SHIFTDOWN}{RIGHT}
Send ^c
Send {CTRLUP}{SHIFTUP}{End}
Send findset then repeat
Send {Enter 2}
Send until ^v
Send .next = 0;
Send {Home}{Up}{Space}{Space}
What's the point?
I type in Navision or Business Central e.g.
if cust.fs( - nothing else.
The script first deletes the part fs(, by itself (because of the option "Replace directly (otherwise on space, Enter...)), then makes a jump to the left, copies me the RecordTeil Cust., jumps to the right again, types findset then repeat, makes a line break, and then adds partly as text, partly as content of the previously filled clipboard until Cust.next = 0; .
Because the record part itself is copied from the C/Side input, it doesn't matter whether I typed Cust in this case, got it from the object menu using F5 or got it from the clipboard using CTRL+V.
The above script fits exactly to the C/side client up to version 2009R2. After that the jumping at the special character . has changed, so for the C/Side successor versions of Navision and Business Central, e.g. NAV 2013 or NAV 2016, it has to be adapted a bit. Using the ac'tivAid option "Only" or "Not" for program , this could even be automated to the extent that you can use the same abbreviation in the Classic C/Side client as well as in the RTC C/Side client.
So I saved the most common Business Central or Navision commands in the form I use most often:
cdt( for createdatetime(workdate,time) ff( for findfirst then (if findfirst then) fl( for findlast then (if findlast then) intloop for if Number = 1 then begin... if not rec.findset then CurrReport.BREAK end else if rec.next = 0 then CurrReport.BREAK; - our favorite loop when working with Temporary Records in reports like the Article Top 10 or Debtors Top 10. sf( for setfilter( sr( for setrange( sk( for setcurrentkey( sss( for strsubstno(' tf( for testfield( fs( for if rec.findfirst then repeat...until rec.next = 0;
More HotStrings / Hotkeys in AutoHotKey
In HotString I have even more text modules, such as my AGB's, automated texts for rejections to headhunters and various more. The advantage: You have these text modules not only in a certain program, such as Word or outlook available, but in all programs at the same time!
In all versions of Business Central or Navision with the classic C/Side (CSide) development environment, this user hotstring in Ac'tiveAid / Autohotkey also helps to quickly assign the correct caption!
As a reminder: Many of us certainly use the possibility to simply label the name and the caption of a field. With this you are "in itself" also really finished, Navision can then display the caption in German, in English the name.
But this is not correct! At the latest from Navision Dynamics 2015 this laziness falls on the feet, and Navision shows in English nothing more, or continues the German Caption (has changed in between times, I think). Therefore there is only one way of working: Immediately fill the caption correctly!
With this UserHotkeys a breeze!
You press somewhere (!) in the captions Ctrl+F12, and Ac'tiveAid or Authotkey jumps to the top, then 2 lines down to the property Name, copy the Value there, go 2 more down, press 2 x F2 (to jump editing to the end of the Value), and paste ;enu= plus the clipboard there. No more excuses for laziness!
The Send Delay:20 is very important, otherwise Autohotkey is simply too fast for Navision and the F2 is lost!
More hotkeys / shortcuts in Navision & Business Central C/Side
Actively use the clipboard
Use the shortcuts CTRL+G for Globals and CTRL+L for Locals. Also remember that in C/Side, just like in ClassicClient and Excel, you can scroll through the tab pages with CTRL+PICTUREUp and CTRL+PICTUREDown!
With CTRL+L (for locals) and 2 x CTRL+PICTUREDOWN you can switch to the local variable declaration in C/Side without using the mouse. Your carpal tunnel syndrome will thank you...
Disable "local" in functions? CTRL+ (Globals), 2 x CTRL+PICTUREDown (to get to the Functions page), select function, Shift+F4. Shift+F4 opens properties in the whole S/Side client. Delete yes with Local , , do not overwrite with No!!
Another function, which has resulted from a customer request:
An automatic license switch when starting Navision Financials/Attain. This is needed, for example, when you are in the process of switching between Classic Client and RTC Client. Modern UI is something completely different again, there is no longer a local license, only the Navision Service service has one. You could also use the same script to work more easily with a “flown in” developer license.
Reminder: fin.exe and finsql.exe no longer accept Licence= or Keyboxpath= as parameters.
Reminder: the navin.exe from Navision DOS 3.53, 3.56 etc could still be started with the parameter Keyboxpath=c:\temp\navi_inf.dat,serialno=Lizenznummer des Datenbankservers , and thus immediately use a different (e.g. a developer license) at startup. More about the old Navision here and hereBut even more articles on my site deal with the ingenious DOS Navision! But myself too 🙂
With Ac'tiveAid this script helps:
(to follow)