How to find which language modules are you licensed to use?

I was recently asked a question “what’s the difference between Irish (IE) and British (GB) localizations of Dynamics NAV?“. The answer to this question wasn’t that interesting, as at least from functionality (objects) perspective, the releases are identical.

The difference between IE and GB localizations of Dynamics NAV

I wonder if there are any differences in costs associated with buying Dynamics NAV in Great Britain or in Ireland?

Anyway, this analysis led to more interesting question: how to find which language modules are you licensed to use? For example, if I have installed GB version of Dynamics NAV, can I still run Irish language (ENI)? Well, we can definitely import language packs, but will our license file allow to see these languages? So, for example, if I go to Tools > Language…, I can see two languages available:

Tools - Language

So, if I download the language pack from Microsoft and import it to Dynamics NAV, will I be able to use the new language? Or if, to rephrase a question, how to find which language modules are you licensed to use?

In order to save time (and not starting with language pack import), it is better to find out what languages are licensed and then if needed, you might want to buy a granule for additional language and only then import language pack.

I have written about virtual tables already (License Permissions), this time we will utilize them again. If we would go to Object Designer, create a new form, define table number 2000000045 (which stands for Windows Language, but entering the number manually is so much more geekier), click preview. This will give us a list of ALL languages, that Dynamics NAV client could use… even if you do not have the language pack installed or if you are not licensed to work in that language. Filter on “Globally Enabled”. This gives you the languages that are currently assigned to your license file.

Windows Language - Globally Enabled - Licensed Languages

Also, if you would filter on “STX File Exists”, you would get a list of languages packs that are installed/imported to your Dynamics NAV client.

Windows Language - STX File Exist

Yes, for the sake of this post, I downloaded English (Ireland) language pack and imported it. But because, “Globally Enabled” is set to FALSE (which means, that I am not licensed to use this language pack), I cannot select this language from Tools > Language.

Therefore, if you want to use a language pack, and you do not have a checkmark in “Globally Enabled” in Windows Language table, you will need to buy a separate granule.

If you have any questions or suggestions, please leave a comment!

Technorati Tags: , , ,

Posted in Dynamics NAV / Navision, Tips & Tricks | Tagged , , , | 1 Comment

Error: The following ODBC error occurred: [Microsoft][ODBC SQL Server Driver]Database is invalid or cannot be accessed State ID: HY024

I have written how to upload (and why to use Upload function) Dynamics NAV license file already. In the past, I have also have shown how to do this a number of times for consultants, developers and end-users. And once in a while, I would get another question – when I am trying to upload the license file, I get error message (screenshot below). Is the license file wrong? What did it do to my database?

Upload License File - Database is invalid error

I must admit, the error message looks scary (at least, it did for me, when I was trying to upload a new license to LIVE database for the first time – What?? Database is invalid?!), but in fact, the issue (and solution for it) is quite simple – you don’t have enough permissions on SQL server to upload the license file.

Microsoft Dynamics NAV Classic
The following ODBC error occurred:

Error: [Microsoft][ODBC SQL Server Driver]Database is invalid or cannot be accessed
State ID: HY024


So, how do you get rid of this error message? Simple! If you are the one who needs to be uploading new license files, then ask your SQL administrator to give you (at least) sysadmin permissions on the server level:

Upload License File - Server Roles

Or, find someone else, who already has these permissions, and give him the task of uploading Dynamics NAV license file.

Technorati Tags: , , , , , ,

Posted in Dynamics NAV / Navision | Tagged , , , , , , | Leave a comment

Error: Document No. DOCUMENT is out of balance by 0.01. Please check that Posting Date, Document No. and Amount are correct for each line.

Most of Dynamics NAV functionality is built on top of journals. Whenever you post something (i.e. sales order, purchase invoice) the system in the lowest level will be posting General Journal for you (this was extremely well explained in a book “Microsoft Dynamics NAV 2009 Application Designer” by Mark Brummel which improved my understanding of underlying Dynamics NAV functionality, but… this is already a completely different topic). Therefore, the place where you would least expect to get any error messages, would be General Journals.

But, once in a while (this is how helpdesk stories could start… instead of saying “once upon a time”, you could say “once in a while”) I get a glimpse of this Dynamics NAV error message: Document No. DOCUMENT is out of balance by 0.01. Please check that Posting Date, Document No. and Amount are correct for each line.

General Journal Error - Document No is out of balance by 0.01

And then… depending on who you will ask for help, you might get different answers:

  • developer: general journals need to balance to 0. It’s not. Why? Let’s try to debug…
  • consultant (who doesn’t know): let’s try to define “Bal. Account Type” and “Bal. Account No.” fields and try to post the journal again (this would obviously work, but… what if we need to have only one entry for Bank Account?
  • consultant (who knows): general journals need to balance to 0. Click Functions > Insert Conv. LCY Rndg. Lines to balance the journal.

Functions > Insert Conv. LCY Rndg. Lines
General Journal Error - Functions - Insert Conv. LCY Rndg. Lines

Excerpt from Dynamics NAV Help files:

When you enter foreign currency amounts in a general journal, the program will automatically convert the amounts to LCY. However, even if all the journal lines balance in the foreign currency, when each journal line is converted and rounded to LCY, their LCY sum may not balance. This means that a balanced transaction in foreign currency may not balance in LCY, and can therefore not be posted.

You can use the Insert Conv. LCY Rndg. Lines function to insert a rounding correction line in the general journal. This rounding correction line will balance LCY when the foreign currency amounts also balance. You can then post the journal.

Before you use this function, you must specify the G/L accounts that the program will use for the rounding correction. You specify these accounts in the Conv. LCY Rndg. Debit Acc. and Conv. LCY Rndg. Credit Acc. fields in the Currency table.

So, what happens, after you run Functions > Insert Conv. LCY Rndg. Lines in General Journal? Well, additional lines for LCY roundings (surprise, surprise?) is inserted:
General Journal Error - Rounding Line Inserted

And then you can post the journal.
General Journal Error - Journal Posted


Have you ever encountered this error message?

Technorati Tags: , , , , ,

Posted in Dynamics NAV / Navision, functionality | Tagged , , , , , | 4 Comments

How to display percentage sign (%) with MESSAGE in Dynamics NAV?

I would definitely ask this question as part of the interview process for Dynamics NAV developers (that is, if I had a chance to interview someone… ok, I should stop dreaming and come back to reality now). This question is quite good, because, you will know the answer only if you have encountered this question before.

Message Function

So, how to display percentage sign (%) with MESSAGE function in Dynamics NAV? For example, if you would try

MESSAGE(STRSUBSTNO('You have %1%2 right now.',15,'%'));
MESSAGE(STRSUBSTNO('You have %1%2 right now.',15));

you would get some interesting results (but not what you actually need):

Wrong Message - Line BreakWrong Message - Missing Percentage

After this, (the easiest way, of course, is to give up, right?) you might decide to use word “Percent” instead of sign “%” (which is a valid solution and I’ve seen this used many times). But, if you don’t like giving up, try something else! Well, to start with, you don’t really need STRSUBSTNO function in the message. Try calling MESSAGE function without STRSUBSTNO:

MESSAGE('You have %1%2 right now.',15,'%')

you will get:

Correct Message - %


Technorati Tags: , , , ,

Posted in development, Dynamics NAV / Navision, functionality, Tips & Tricks | Tagged , , , , | Leave a comment

How to activate Dynamics NAV license file?

I am making an assumption that if you are working for a partner, then you know this already (how to upload Dynamics NAV license file, that is). However, if you are working as an end-user, then there is a slim possibility, that you don’t (yet!). Also, you most likely have asked these questions already: how to activate dynamics nav license file? What do you mean upload? Can I use Import? What’s the Change button for?

So, firstly, you need to get a hold of FIN.FLF file. Your partner might give you “Customer Name blah blah something.FLF” file, therefore the first step you should do is to rename the file to FIN.FLF. Once, you have FIN.FLF ready, you will need to upload the file to your database (I am also making assumption here, that your Dynamics NAV is running on top of SQL server, because… whose isn’t?).

How to upload Dynamics NAV license file?

    • Open Dynamics NAV client and connect to your database.
    • Click Tools > License Information.

Tools - License Information

    • Click Upload.

License Information - Upload

    • Select your new license file.

License Information Upload - Open

    • Click OK.

License File - Uploaded

    • Result!

Used to upload your license file to the SQL Server that you wish to access. The license information will be used by all the client computers that connect to this server unless a database license file is being used.

Can I Import Dynamics NAV license file?

No, not really. Importing the file will only affect your Dynamics NAV client. That is, license file will be copied accross to your Dynamics NAV client’s folder. So, all other users, who are connecting to the server, will not use the new license file. On the other hand, you will not neither… because once connected to the SQL server, license will be picked up from server.

Used to import a new license file, which can then be used each time the application is opened (or until another license file is imported). Note, however, that as soon as a database is opened on a SQL Server, the license information on the server will be used and, therefore, the imported license file will not be used.

What’s the Change button for?

If you are working for a partner, then that the option you will be using almost always. Whenever you will need to temporarily (that’s the main point in Change button – TEMPORARILY!) load developers license file (on the TEST database, obviously), you will use “Change…” function. As a customer, you might want to use this option for testing the new license file. If for example, you bought additional 10 tables, use “Change…” function to test if new tables are accessible.

Used for a temporary change of license file, when a dealer visits you, for example, and has brought his or her own license file on a diskette (to be able to use C/AL permissions). This function ensures that the change is not saved the next time you start the program, and your old license file is used. You must be sure to use this if you want to work using the demonstration license file cronus.flf, otherwise you may overwrite your own license file.

I hope this helps. If you have any questions, just leave a comment. Thanks!

Related Links

Technorati Tags: , , , ,

Posted in Dynamics NAV / Navision, errors | Tagged , , , , | 2 Comments

Can you save RDLC reports as PDF documents in Dynamics NAV 2009 R2? Without using Preview?

Can you save RDLC* reports as PDF documents in Dynamics NAV 2009 R2? Of course, you can! You can save RDLC reports as PDF documents in Dynamics NAV 2009 R2 (to be fair, you could do this for years now… starting with Dynamics NAV 2009).

Run your report (for example, click Reports > Customer – Top 10 List),
Reports - Customer Top 10 List
click Preview button,
Customer Top 10 List - Click Preview
click Save and select “Acrobat (PDF) file”.
Customer Top 10 List - Click Save - Acrobat (PDF)
And save report as PDF file.

Easy? Yes, it is. But what about printing reports to PDF files without running the Preview function? When you look at above steps from productivity point of you, you can see that there are quite a few places for improvement – think RoleTailored! It should be all about PRODUCTIVITY (it’s not that I am complaining, remember RTC can print reports in colours – which is already exciting)!

However, it gets even more exciting! Starting from build 32843 (KB article 2628333 – which as far as I see, has not been published yet! You must love Microsoft blogs – hey, German Nav Developer – you rock!), you can get your own black belt in RTC client productivity. What’s the point of previewing the report, if your intention was to save report as PDF anyway? Useless! Finally, this has been fixed. With the latest hotfix (which you can download from here), you will be able to save reports as PDFs straight from the Request form.**

Run your report in RTC (for example Click Reports > Customer – Top 10 List),
click Print > PDF:
Print - PDF (No Preview)


* RDLC (Report Definition Language for Clients applications – C stands for Client/Side processing)

** In order to use new functionality you will need to follow these steps:

  • Download the hotfix – build 32843
  • Stop “Microsoft Dynamics NAV Server” and “Microsoft Dynamics NAV Business Web Services” windows services.
  • Extract the hotfix and apply it to your installation (copy and replace the files in appropriate folders).
  • Connect to your database with Microsoft Dynamics NAV Classic client and compile all objects.
  • Start  “Microsoft Dynamics NAV Server” and “Microsoft Dynamics NAV Business Web Services” windows services.
  • Connect to Dynamics NAV RTC client and test/print reports to PDF files.
Related Links

Technorati Tags: , , , , , , ,

Posted in Dynamics NAV / Navision, functionality, hotfixes | Tagged , , , , , , , | Leave a comment

How to use Replace All function in Dynamics NAV?

I know most of us (geeks living in the world where Dynamics NAV is not just a simple accountancy package) know what CTRL+F means by default (without really thinking). If you want to search for something, you click CTRL+F and start typing. If you are a little bit geekier, you will start typing without clicking CTRL+F (and Dynamics NAV will open “Find” dialog for you).

CTRL+H – Replace Function

However, do you know how to rus “Replace All” function? What’s the keyboard shortcut? No, it is not CTRL+R. It’s CTRL+H. Blah.. blah.. blah… but why this should be exiting? Well… how many times did you need to write a quick processing only report to update a field from one value to another? Obviously, if you needed to update only a few records, you could go directly into Object Designer, open the table, and update values as necessary (did I just said you could? I meant… it is possible, not that you shoudl, just because you can).

But… if we would continue talking about what is possible… then, did you know that you could use CTRL+H instead?

Let’s have a look at this example: go to Object Designer and run customer table.

Replace Function - Object Designer

Click on “Location” column (note: I selected one with Location Code – BLUE)

Replace Function - Customer record, Location Field

Click CTRL+H and define “Replace With” field.

Replace Function - From BLUE to WHITE

Click “Replace All”. So, do you want to replace all occurrences of BLUE to WHITE? Well, that’s what we are trying to achieve with this example. Click “Yes”.

Replace Function - Click Replace All


Replace Function - Replaced

Maybe, this is not the best example, but it is good to know what is possible to do without any additional developments. Hopefully, someday you will find this useful!

Technorati Tags: , , , , ,

Posted in Dynamics NAV / Navision, Tips & Tricks | Tagged , , , , , | 3 Comments