Dynamics User Group
Since 1995 - The Microsoft Dynamics Online User Community

List of the Undocumented Features of Dynamics NAV

rated by 0 users
This post has 15 Replies | 9 Followers

Top 10 Contributor
Male
Posts 3,443
Points 106,265
Member since 10-01-1995
DynamicsNAVMVP
Moderator
SystemAdministrator
Erik P. Ernst Posted: 08-21-2008 11:36

If you've worked with Dynamics NAV or Navision for a few years, then you properly already know at least one or two. Because they are many, the UNDOCUMENTED FEATURES and functions. They range from small helpful function which can be used without much documentation to larger functions, which really should be used without you understand them completly.

I have previously confronted Microsoft with some of these features. Their only answer was that they will not document them, because they this way don't have to tell us if they remove them! So they basically warn us from using them.

List of the Undocumented Features of Dynamics NAV

x += 1; or x -= 1; 

One of my own favorites is the one above. It makes the old line like x := x + 1; or x := x - 1;

This function is available up to Dynamics NAV 5.0 (I have not tested it with version 2009).

 

So come on guys and girls, please share your knowledge about the undocumented features and functions that you know of exists in Dynamics NAV/Navision. When replying then please write if you know which versions the features are supported in, and if you know of any standard objects (or maybe add-ons) where this feature is used.

Best regards,
Erik P. Ernst - webmaster at dynamicsuser.net

DynamicsUser.net Admin's Blog

Not Ranked
Posts 21
Points 305
Member since 02-19-2008
Django Dunn replied on 08-21-2008 14:55
This one I learned from Navision Girl.  In any text field you can type a question mark and press enter and the Standard Text window appears.
  • | Post Points: 35
Not Ranked
Posts 25
Points 475
Member since 06-25-2008

Oh, oh.  I didn't know that the syntax in your example (x += 1) is officially undocumented.  I probably saw it in some existing code.  There's so much stuff missing from or hard to find in the documentation, I just figured that it was OK to use.

  • | Post Points: 20
Top 200 Contributor
Male
Posts 111
Points 1,225
Member since 03-09-2004
Timo Lässer replied on 08-22-2008 9:58

Another nice trick:

If you know the field numbers of the table but not surely the field names, you can write your code based on the field numbers:

SalesLine.SETRANGE(Field1,SalesHeader.Field1);
SalesLine.SETRANGE(Field3,SalesHeader.Field3);

If you save and close this code and open the object in Design Mode, you will see, that NAV replaced your Syntax by the field names:

SalesLine.SETRANGE("Document Type",SalesHeader."Document Type");
SalesLine.SETRANGE("Document No.",SalesHeader."No.");

This also works for key definitions in the table designer, properties, which expect a field name (SourceExpr, TotalFields, ReqFilterFields, ...).

Timo Lässer

www.MSDynamics.de
- the german speaking Microsoft Dynamics Community

Top 10 Contributor
Male
Posts 3,443
Points 106,265
Member since 10-01-1995
DynamicsNAVMVP
Moderator
SystemAdministrator

Yes this is also a good one. Just remember when if you have just created the fields (and have not saved and reopened the table designer in the meantime), that you will get a compilation error when you try to save it. But just save it without compiling and reopen again.

Another one in the same area is:

When creating ex. new keys, defining relationships between fields/tables, then you can also just enter the field no. instead of the full field name. The same goes to specifying tables. Just enter the table no. - just a shame that there are so many tables now - it was much easier back in the old DOS days, when one could remember almost all the standard table numbers!

Best regards,
Erik P. Ernst - webmaster at dynamicsuser.net

DynamicsUser.net Admin's Blog

Top 10 Contributor
Male
Posts 5,421
Points 67,563
Member since 04-12-2001
DynamicsNAVMVP
Moderator
SystemAdministrator

Django Dunn:
This one I learned from Navision Girl.  In any text field you can type a question mark and press enter and the Standard Text window appears.
 

 

Actually its been documented since at least the DOS version 3.04. Indifferent

I beat my head against a wall everytime I find an end user whose Partner didn't tell them about this feature.

 Also not only does the window pop up, if you type ? and the code it automatically iinserts the text. Cronus even has test data in it to test this.

FYI: 

http://wiki.dynamicsbook.com/index.php?title=Standard_Text_table

David Singleton - MVP Dynamics NAV Dynamics NAV Consultant since 1991 Available for Navision Go-Live assistance
Dynamics Book
Not Ranked
Male
Posts 21
Points 235
Member since 06-25-2006
azerty replied on 08-26-2008 10:04

http://plataan.typepad.com/microsoftdynamics/2008/06/import-fbk-undo.html

http://plataan.typepad.com/microsoftdynamics/2007/07/breakpoint-tabl.html (but this one is documented)

http://plataan.typepad.com/microsoftdynamics/2007/03/permission_rang.html

 

Debugging is twice as hard as writing code. Therefore if you write the code as cleverly as possible you are by definition not smart enough to debug it.
Top 150 Contributor
Male
Posts 143
Points 2,005
Member since 02-29-2000
DynamicsNAVMVP
Moderator
ReGa replied on 08-27-2008 22:39

Searching field names in table designer

  1. Open the design of a table
  2. Set the focus to the "field name" column
  3. Select all (mark all)
  4. Press the starting character of the field name
  5. Select all
  6. Press the starting character of the field name
  7. ....
  8. (after some “select all” the selection remain)

or import ONLY objects from a fbk(backup) file (oh i see it is mentioned in post below)

  1. Go to object designer
  2. File import
  3. Filetyp - All files
  4. Select the fbk file
  5. The included objects will be imported

 

Rene Gayer
Top 150 Contributor
Male
Posts 143
Points 2,005
Member since 02-29-2000
DynamicsNAVMVP
Moderator
ReGa replied on 08-27-2008 23:33

Or
what about copy object from one database to the other with Copy and Paste

Select a table in Object Designer
Select Copy
Go to the other database (same version) object designer
Select paste
(I think it is only working up to version 3.70 – then MS locked the designer)

Or

Copy and paste instead of Save as (objects)

1.Copy and Paste an existing objects in the object designer

2.Error message about the objects exist

3.It will be inserted anyway

4.Change the number

5.The object is copied

Or

F3 in the object designer for create a new object

Or

F3 in Form Designer for create a text box

okokok Stick out tongue

not all of them are useful but anyway .. Geeked

 

Rene Gayer
Top 10 Contributor
Male
Posts 5,421
Points 67,563
Member since 04-12-2001
DynamicsNAVMVP
Moderator
SystemAdministrator

ReGa:

what about copy object from one database to the other with Copy and Paste
(I think it is only working up to version 3.70 – then MS locked the designer)

 

It still works, BUT the paste only works if you are currently on a 50,000-99,999 object. So to solve this in a new database, just create say form 99,000 put the cursor on that and hit paste.

 

ReGa:
Copy and paste instead of Save as (objects)

I feel quite silly, but since ver 1.0 this is how I thought was the only way to "save as", since its the way I was shown in a class, and it was only about a year ago I was with someone training them, and they hit Save As, an option that I had NEVER seen before in NAV, and I could not believe it had been there since day one. Embarrassed

 

 

David Singleton - MVP Dynamics NAV Dynamics NAV Consultant since 1991 Available for Navision Go-Live assistance
Dynamics Book
Top 10 Contributor
Male
Posts 3,443
Points 106,265
Member since 10-01-1995
DynamicsNAVMVP
Moderator
SystemAdministrator
Erik P. Ernst replied on 08-28-2008 9:19

Scenary: You are sending out and update to your customer with new objects and asking him to install them himself. But as a good programmer you also like to clean up after yourself. So objects which are no longer used, should be deleted. One way of cause is to tell the user to do this. Another way is to like below:

In the Object Designer, ex. for tables. First delete the object you need to delete in your development database. Then you go down to the last entry of the Object list, then do not use F3 or new, but instead go down so that you can enter a new object number directly on the list. Enter the number of the object you want to delete! Give the objects names, date and version lists etc. - but DO NOT MODIFY the object with the Designer! This way the objects remain empty except for the header.

When you export the objects, then include these new "empty" objects.

When the user imports the objects, then they will automatically be marked for "Delete" in the Object Worksheet.

Of cause you need to make sure that if you do this with tables, that they are actually also empty from data before doing this!

This feature has worked since version 1 of Dynamics NAV, but as far as I remember then there has been a few versions in between where Microsoft locked this featured. But now again in NAV 5.0 it works.

Best regards,
Erik P. Ernst - webmaster at dynamicsuser.net

DynamicsUser.net Admin's Blog

Top 75 Contributor
Male
Posts 275
Points 4,100
Member since 05-06-2008
DaveT replied on 08-28-2008 23:41

 

Don't know if this is documented but saves me time:

 When importing a fob with lots of objects you can filter the list down to the object(s) you need and it only imports them. No need to set the others to skip.

Dave Treanor

Dynamics Nav Add-ons

www.simplydynamics.ie/Addons.html

Top 150 Contributor
Male
Posts 143
Points 2,005
Member since 02-29-2000
DynamicsNAVMVP
Moderator
ReGa replied on 08-29-2008 14:05

Is it a feature ? Indifferent - it is a short cut - but nice to know.

 Sometimes in developing it is necessary to reopen the database. -> Like example changing the CU 1.

The most developer closes the database or restarts the client. 

But you can also press “alt” + “f” +”1” (to reopen the current company (and database) once again) It is also possible that it is “alt” + “f” +”2” … it depends on how many companies do you have ….

Rene

Ps what about changing the topic to "best practice"? or new post?

Rene Gayer
Top 50 Contributor
Male
Posts 466
Points 6,795
Member since 03-10-2006
DynamicsNAVMVP
kriki replied on 09-03-2008 14:08

Timo Lässer:
SalesLine.SETRANGE(Field1,SalesHeader.Field1);
SalesLine.SETRANGE(Field3,SalesHeader.Field3);
 

 Also this works:

SalesLine.SETRANGE("1",SalesHeader."1");
SalesLine.SETRANGE("3",SalesHeader."3");

 

And this for the options:

SalesLine.SETRANGE("1",SalesLine."1"::"0");

 

IF Debugging = removing bugs from program THEN programming := putting bugs in program;
  • | Post Points: 20
Top 50 Contributor
Male
Posts 466
Points 6,795
Member since 03-10-2006
DynamicsNAVMVP
kriki replied on 09-03-2008 14:10

How to put a TAB or a CRLF in a text-string?

txtTAB := 'X';

txtTAB := 9;

 

txtCRLF := 'XX';

txtCRLF[1] := 13;

txtCRLF[2] := 10;

IF Debugging = removing bugs from program THEN programming := putting bugs in program;
  • | Post Points: 45
Page 1 of 2 (16 items) 1 2 Next > | RSS


Copyright Dynamics User Group, 1995-2009, all rights reserved. The Dynamics User Group is not affiliated with Microsoft Corporation.