Saturday, October 24, 2015

Keyboard Shortcuts in NAV 2016

keyboard-70506_1920
Below you will find all the keyboard shortcuts available in NAV 2016 for windows client, development environment and C/AL Editor

The following table provides an overview of shortcut key combinations in the Microsoft Dynamics NAV Windows client.


Microsoft Dynamics NAV Windows client

Action

Right Arrow Move to the next field or character
Left Arrow Move to the previous field or character
Up Arrow Move to the field above in the same column
Down Arrow Move to the field below in the same column
Delete Clear selected text
Esc Close the window or undo the data entry
End Move to the last field on a line
Home Move to the first field on a line
Tab Move to the next field on non-line FastTabs
Enter Move to the next editable field
F1 Open Help
F2 Edit
F3 Select Type to filter (field filter)
F4 Drop-down or look up to select
F5 Refresh the active window
F6 Go to the next frame
F7 Display statistics
F8 Copy the field above
F9 Post
F10, Alt Select the menu bar and display access keys
F12 Select the navigation pane
Shift+F1 View error message
Shift+F3 Select Show Results (FlowFilter)
Shift+F4 Open a lookup window (from an ellipsis button)
Shift+F6 Go to the previous frame
Shift+F7 Open the related card
Shift+F8 Drop-down or look up to view
Shift+F9 Post and print
Shift+F10 Display a shortcut menu
Shift+F11 Apply entries, get source documents, or get warehouse documents
Shift+F12 Open the Role Center from the navigation pane
Shift+Tab Move to the previous field
Shift+left-click On multiple column headers, the columns will all be sorted in the same ascending or descending direction.
Shift+double-click If sorting on multiple column headers using Shift+left-click, use Shift+double-click on the first column that was clicked on and this will toggle ascending/descending direction of all the columns included in the sorting.
Left-click Left-click on a column header to sort a column ascending, then left-click again to toggle between ascending and descending.
Ctrl+F1 Collapse or expand the ribbon
Ctrl+F2 Create a new document
Ctrl+F3 Select Search pages
Ctrl+F4 Look up to the related list
Ctrl+F7 View entries
Ctrl+F9 Release document
Ctrl+F10 Select the ribbon and display key tips
Ctrl+F11 Reconcile or split lines
Ctrl+F12 Select the address bar
Ctrl+C Copy
Ctrl+G Go to
Ctrl+E Export to Microsoft Office Excel
Ctrl+L Show links
Ctrl+N Create a new record
Ctrl+O Open the company
Ctrl+P Print
Ctrl+T Select sorting
Ctrl+V Paste
Ctrl+W Export to Microsoft Office Word
Ctrl+X Cut
Ctrl+Z Undo
Ctrl+Page Down Display next document or card in a list
Ctrl+Page Up Display previous document or card in a list
Ctrl+Up Arrow Move up while the selected line stays selected
Ctrl+Down Arrow Move down while the selected line stays selected
Ctrl+Left Arrow Move to the first field on a line
Ctrl+Right Arrow Move to the last field on a line
Ctrl+Alt+F1 Open the About this Page/Report window (Zoom)
Ctrl+Delete Delete the selected line
Ctrl+Home Move to the first line in a list
Ctrl+End Move to the last line in a list
Ctrl+Enter Save and close window (equivalent to choosing the OK button)
Ctrl+Insert Insert new line
Ctrl+Shift+F3 Select Limit totals to (table filter)
Ctrl+Shift+A Clear all filters
Ctrl+Shift+C Copy Rows
Ctrl+Shift+D Show dimensions
Ctrl+Shift+E Edit list
Ctrl+Shift+R View list
Ctrl+Shift+Q Collapse/expand a line in a hierarchy
Ctrl+Shift+V Paste rows
Ctrl+Shift+W Open a list place in a separate window
Ctrl+Shift+Enter Save and close the window and open a new window
Alt Display access keys in the ribbon
Alt+F2 Toggle to display/hide FactBoxes
Alt+F3 Filter to the value in the field
Alt+F4 Close window or close program
Alt+F6 Collapse or expand the active frame
Alt+F12 Optimize space for the current page
Alt+Left Arrow Go to the previous window in the navigation history
Alt+Right Arrow Go to the next window in the navigation history
Alt+Enter Move to the field below without opening the drop-down menu
Alt+Tab Toggle between open windows


The following table provides an overview of shortcut key combinations in the Microsoft Dynamics NAV Development Environment
.

Keyboard Shortcut

Action

Right Arrow Move to the next field or character
Left Arrow Move to the previous field or character
Up Arrow Move to the field above in the same column
Down Arrow Move to the field below in the same column
Delete Clear selected text
Esc Close the window or undo the data entry
End Move to the last field on a line
Home Move to the first field on a line
Arrow, Tab, Enter Move to the next field on non-line FastTabs
F1 Open Help
F10, Alt Select the menu bar and display access keys
F6 Drop-down or look up to view/select
Arrow, Shift+Tab Move to the previous field
Ctrl+C Copy
Ctrl+O or F12 Open the company
Ctrl+V Paste
Ctrl+X Cut
Ctrl+Z Undo
Ctrl+Home Move to the first line in a list
Ctrl+End Move to the last line in a list
Esc Save and close window (equivalent to choosing the OK button)
F3 Insert new line
Alt+F4 Close window or close program


The following table describes the keyboard shortcuts that are available from the C/AL Editor window

Keystroke

Action

Ctrl+G Open the C/AL Globals window to view and declare the global variables, text constants, and functions in the object.
Ctrl+L Open C/AL Locals window to view and declare local variables and text constants for the current function or trigger.
Ctrl+Z Undo the last action.
Ctrl+Y Redo the last action.
Ctrl+J List all members (as IntelliSense) for the local scope.
Ctrl+Space List the members (as IntelliSense) for global scope.
Ctrl+W Select the word.
Ctrl+U Make the selected code lowercase.
Ctrl+Shift+U Make the selected code uppercase.
Ctrl+Shift+N Expand all collapsed code.
Ctrl+K+I Display information about C/AL symbol (such as variable, functions, and parameter) in which the cursor is positioned. This displays the same text as when you point to the element.
Please leave your comments, feedback or any suggestions you have for me to improve me my blog and also if you have any questions, feel free to post..

Share:

How to resolve “Divide By Zero” Error in Navision RTC Report

question-686336_1920

One of the common error in RTC reports is #Error and there are many reasons for #Error in RTC report, but in this post I want to discuss one of the scenarios i.e. "Divide By Zero" exception.

If you have an expression which results Divide By Zero Exception then the result you see is #Error, and normally to avoid this you can write an IIF statement in expression.

For Example:

To display the value as zero if the denominator is zero then I would write something like this

=IIF(Sum(Fields!LineAmt.Value)=0,0,Sum(Fields!NetGP.Value)/Sum(Fields!LineAmt.Value))

 

In the above expression, I am doing a quick check to see if Sum(Fields!LineAmt.Value) is zero, then I want to display Zero otherwise I evaluate my expression, it is pretty simple. But here is the problem the reporting processing engine will still evaluate FALSE part, in this case Sum(Fields!NetGP.Value)/Sum(Fields!LineAmt.Value) and the result will be #Error even if Sum(Fields!LineAmt.Value) is Zero.

There are two possible solutions in this case to resolve the error:

1st Option:

 

=IIF(Sum(Fields!LineAmt.Value)=0, 0,Sum(Fields!NetGP.Value)/iif(Sum(Fields!LineAmt.Value)=0,1,Sum(Fields!LineAmt.Value)))

 

2nd Option:

VB Function

Public Shared Function DivideByZero(ByVal Numerator As Decimal, ByVal Denominator As Decimal) As Decimal

   If Denominator = 0 Then
     Return 0
   End If
   Return (Numerator / Denominator)
End Function

 

and use the following expression

Code.DivideByZero(Sum(Fields!NetGP.Value),Sum(Fields!LineAmt.Value)

 

Personally I prefer the VB function because it is neat and can be used in multiple places.

Please leave your comments, feedback or any suggestions you have for me to improve me my blog and also if you have any questions, feel free to post.

Share:

Thursday, October 22, 2015

Milestone10,000 page views reached

I am very happy to see this number on my blog today, I started blogging couple of years ago but did not post more than 5 or 6 blogs, but in the last couple of months I started blogging actively and in just few months the visitors to my blog increased and today it crossed 10,000. Thanks to all for your support and this really encourages me to publish good content and helpful tricks.

image

 

 

 

Thank you All.

Next milestone is 20,000….

Share:

Monday, October 19, 2015

Naming Conventions in Navision

One of the best programming skills every programmer needs to have is to follow the proper naming conventions of the application and also do proper documentation of the changes they are making.  Microsoft provided some naming conventions to follow for Dynamics NAV and please check the below link for more information
Share:

Empty Rows/Columns on the Navision Report when printed to Excel

info-553639_1920

I was asked recently to create a  custom sales report which salespersons wants to output the data into excel, since RTC reports have the option to save as excel, I created a simple report with row header and values, so that users can run this report and use Print Save as Excel option, but when the report is saved as excel it created empty rows and columns.

Below is the example of the excel when the report is saved as excel

image

In my report design the tablix does not have any hidden rows or any other header rows, so I was started checking how those empty rows are created and can be avoided

This is the screenshot of my report design, as you can see there are only two rows, one is the header and other is the detail.

image

After spending an hour or so, I realized that space is not because of the tablix, but rather the space above the tablix and on the sides, once I removed all the space and made sure there is no space as shown below, the issue was fixed.

image

Below is the screenshot of the excel after the change

image

If you encounter these kind of issue, just don’t concentrate on the tablix on the report, do check the space around it . When the report is exported to excel it takes the whole report into consideration, so try to avoid blank spaces if you know the report will be used as excel.

Please leave your comments, feedback or any suggestions you have for me to improve me my blog and also if you have any questions, feel free to post..

Share:

Tuesday, October 13, 2015

Simple Tool to clear the data from the field in Navision

tool-78016_1280

It is quite often during the implementation or re-implementation projects that there is a need to change a field data type or delete the field after it was added. The issue is if that field has the data, then in order to change the data type or to delete the field we have to clear the field value otherwise you will get the error. Below is an example of such error

image

If you have multiple companies in the database then you to have to clear the data in all the companies before you make the change, normally I create a process report to clear the data and run that in each company but it is a tedious task if you have many companies. I have come across this situation many times, so I have created a simple tool called Clear Fields, this is a process report with option to filter on the table and the field you want to clear, it also has the option to clear the data in all the companies, so you don’t have to change company and run this in each company.

image

As of now this is only designed to clear one field at a time and it handles any field type, in the future I plan to extend this and add more options to it. I have uploaded the .fob and .txt objects in the below location, it also has a word document which will explain the above the request page options

Download Objects: http://1drv.ms/1Mwrzum

Please leave your comments, feedback or any suggestions you have for me to improve me my blog and also if you have any questions, feel free to post..

Share:

Monday, October 12, 2015

Saturday, October 10, 2015

NAV 2016 supports SQL Server Authentication

news-426895_1280

There are lot of exciting features added to Navision 2016, and one of the feature  they added is support to the SQL Server Authentication, in previous versions we can access Navision using the below four credential types

  • Windows
  • UserName
  • NavUserPassword
  • AccessControlService

To learn more about these credential types please refer to the following link

https://msdn.microsoft.com/en-us/library/hh169371%28v=nav.80%29.aspx?f=255&MSPPError=-2147217396

Microsoft Dynamics NAV 2016 supports SQL Server authentication between the Microsoft Dynamics NAV Server instance and the Microsoft Dynamics NAV database in SQL Server. Previously only Windows authentication was supported, but to configure this we need to do the following procedures

  1. Set Up an Encryption Key
  2. Configure SQL Authentication on the Database
  3. Configure SQL Server Authentication on Microsoft NAV Server Instance (Non-Multitenant) or Configure SQL Server Authentication on Microsoft NAV Server Instance in a Multitenant Deployment

All the details about the above procedures can be found at the below link

https://msdn.microsoft.com/en-us/library/dn951464(v=nav.90).aspx

Please leave your comments, feedback or any suggestions you have for me to improve me my blog and also if you have any questions, feel free to post..

Share:

Tuesday, October 6, 2015

Timestamp field available in tables in NAV 2016

If you open a Navision table from SQL server you might have noticed that a timestamp field is available which is a hidden field and was not accessible from Navision in the earlier versions, but with the release of NAV 2016 they made this available to NAV users and you can access that from the Navision, add filters and write code against it.

How to add a timestamp field

In order to access the timestamp field we need to add a custom field to the table with datatype biginteger and we can name it anything but in the properties of the field and we need to set the new property SQL Timestamp to yes.

Whenever you add a record to the table a row version number is generated for that record and stored in that field.

 

image

One important note you can only read the timestamp field we added and use if for filtering purpose or other purpose, but cannot write the data to the field.

The typical usage of this field according to Microsoft help is

A typical use of the timestamp field is for synchronizing data changes in tables, when you want to identify records that have changed since the last synchronization. For example, you can read all the records in a table, and then store the highest timestamp value. Later, you can query and retrieve records that have a higher timestamp value than the stored value.

Please leave your comments, feedback or any suggestions you have for me to improve me my blog and also if you have any questions, feel free to post..

Share:

New MetaData Virtual Tables in NAV 2016

In NAV 2016 there are four new metadata virtual tables were introduced and those are

  • Table MetaData ((2000000136)
  • Codeunit MetaData ((2000000137)
  • Page MetaData (2000000138)
  • Report MetaData ((2000000139)

All these tables are read-only and has all the metadata information about the respective objects. The information which you can access in previous version by looking at the properties (Shift + F4) of the object, now you can access all that information from these tables.

For ex: If you select any table and select properties of the table (Shift +F4) you will see the below information

image

Since virtual tables cannot  be accessed directly from the object designer I created a new page with source table as Table MetaData , and when I ran the page and checked the information in that table about Payment Terms Object, I can see all the above information from the table except the CaptionML and Description, which I believe is very useful.

If you ever want to access properties of an object, you can just create a variable of that subtype and access all the information. Ex: If you ever want to know what is the CardPageID of a page or if InsertAllowed on the page, then you can access it using code.

image

Same is true for codeunits, pages and Reports.

Please leave your comments, feedback or any suggestions you have for me to improve me my blog and also if you have any questions, feel free to post..

Microsoft Thanks for adding these tables.

Share:

Monday, October 5, 2015

New DataType FILTERPAGEBUILDER in NAV 2016

There is a new datatype introduced in NAV 2016 and it is called FilterPageBuilder, this datatype can be used to create a filter page that enables users to set filters on multiple tables. The page can have multiple controls i.e. multiple records and you can use that to capture filters on the records.
The following are the functions that are available for this datatype.

Share:

Code Coverage in NAV 2016

If you remember in previous versions there is a tool called code coverage which was very useful tool to trace the code / debug the error for the developers, but in NAV 2013 and higher version this was not available but an alternative application profiler was available. If you want to learn more about that please visit my blog about this

http://www.archerpoint.com/blog/Posts/using-application-profiler-run-code-coverage-nav-2013-r2

Good news is Code coverage is back again in NAV 2016.

You can access the code coverage from Departments –>Administration –> Application Tools –> Code Coverage

image

It is easy to start, whenever you want trace the code for a specific action, just click the start button before the action and stop after the action. The code coverage page will list all the objects it got hit and will show the functions/triggers and coverage %. You can even filter the page for specific objects or line type.

I hope this tool will really help the developers/consultants to debug the code easily.

Please leave your comments, feedback or any suggestions you have for me to improve me my blog and also if you have any questions, feel free to post..

Share:

Finally a new C/AL editor in NAV 2016 with Intellisense

 

Today NAV 2016 was released and one of the technical improvement/feature in this version is the new C/AL editor with intellisense, this is really a exciting feature. Though this editor is not an advanced version like visual studio editor but it is definitely a great improvement and start over the old C/AL editor.

Intellisense really makes easy to access all the fields, system functions, local functions of the variable/record. It will save so much time and typos.

image

If you declare a variable of record, for ex: I declared a customer variable of subtype Customer table. When I click on the customer variable it will show a small window with all the fields in the customer table with name type and Length. This is very useful when you want to know the type of the field and length of the field in a table.

image

NAV 2016 has so many exciting features and I am pretty sure you will see lot of blogs about those feature in next coming days.

Share: