Pages

Showing posts with label NAV 2016. Show all posts
Showing posts with label NAV 2016. Show all posts

Friday, January 20, 2017

Import a File and Export it as a ZIP file in NAV 2017

Hi guys,

I did some R&D on the File Management codeunit (419) which is available in NAV and found out that it has pretty much all the functions related to files available in it.

For example: For zipping a file, we no longer need third party software to do the job for us in NAV.

Like this, there are many more functions available in this codeunit which we can use to our advantage and play with 'em. I have used some of the functions in an example which I will demonstrate below,

Before starting, I want you to know that this post is not limited to just importing and zipping a file. I want to show you the ability of codeunit 419 and the functions available in it. I have used a couple of them in my code.

Thursday, January 19, 2017

Set filter in report using Text variable in NAV - Tips, Tricks & Facts #10

Hello everyone, It's been a month since I have written any post. Well, sometimes the work is just as much to occupy all your time that you barely get time to do other stuff.

The complete title of this post must be "Set filter in report using Text variable in which the user can use .. (aka range) and | (aka separator) in NAV" but never mind. 😉

I encountered this situation where I wanted to set filter on the report's dataitem using a text variable. So, I asked this question in some forums and got the answer which helped me resolve my problem and I want to share it with you guys too!

Sunday, December 18, 2016

Difference between RESET and CLEAR - Tips, Tricks & Facts #9

Hi guys,

As it is pretty clear from the heading, I am going to compare rec.RESET and CLEAR(rec) in this post.

We are aware of the fact that CLEAR function is used to clear variables of all types. I am going to stick to how does CLEAR work with record type variables for this post.

Sunday, December 04, 2016

Common mistakes we make in C/AL - Vol. 3 - Tips, Tricks & Facts #8

In this post I will talk about Significance of Using CALCSUMS in C/AL coding. 

Before writing about this topic I would mention here that, if a tool (or function) is available then we must use it to our system's benefit. Tools or functions are available in AL (or any other development envo.) to reduce the time taken by transactions and faster output generation.

You can find the detailed definition of CALCSUMS on MSDN. This function must be used to calculate sums of a Decimal field. However, the scope of CALCSUMS has been widened to Integer, BigInteger and Duration type fields along with Decimal type fields from NAV 2016 and up.

Sunday, November 13, 2016

Common mistakes we make in C/AL - Vol. 1 - Tips, Tricks & Facts #6

Hi peeps, starting a new series of posts on what are the common mistakes made by developers like us which have bad, sometimes worse, impacts on database transactions. And what the kind of coding styles we must avoid to keep the code neat and clean. And what are the DO's and DON'T's for writing C/AL code.

We gotta remember that we are not the last developers who will write a particular code somewhere in the NAV objects. There will be more developers after us who will be carrying the torch and some of them might run into some code which was written by us.

Therefore, your code must better be understandable and optimized!

Friday, November 04, 2016

Code changes - NAV 2016 to NAV 2017 - Tips, Tricks & Facts #5

Hi guys, I am gonna talk about the code changes that I liked in NAV 2017 and you must know about them too.

Coding in NAV 2017 is better, as expected.

Just to give an overview. I will cover some examples as follows,


1. Codeunit 80 - OnRun Trigger - This trigger used to be a home of like more than a thousand lines of code. Well now, it has been decreased to a hundred lines of code, give or take. Check the image below,


Saturday, October 15, 2016

Unpacking NAV App Package OR Unpack an Extension in Dynamics NAV 2016 - Tips, Tricks & Facts #4

Hi guys,

Let's take a scenario where an extension named 'My_Location_Extension' was developed, published and installed by a developer named 'Jack' on a NAV Server Instance named 'NAVDemoService'. A few days later Jack is out of reach and 'Jill' (another developer) wants to know that what objects were modified and created by Jack and packaged in My_Location_Extension.

These kind of scenarios happen in real world. I tried to find a PowerShell cmdlet for unpacking a NAV app package but no success.

So, what to do? Other questions which arise in such a situation are,

Sunday, October 09, 2016

What happens to the Data after an Extension is uninstalled in Dynamics NAV 2016 ? - Tips, Tricks & Facts #3

Hi Guys, After my last post on extensions, I got questions from my blog readers that,

What happens to the data if we uninstall an extension in NAV 2016? 

As in, If we uninstall the extension then what about the data in the fields which were packaged in that extension.

Take a look at the screenshot below,

After uninstalling the extension we can see some new tables in our database.


The new tables are marked in orange and the new fields are marked in blue in the image above.

One table is created in SQL per existing Company in the database and this happens only when you have added new fields in a table which was packaged in your extension.

Yes, the names of these newly created tables are confusing but each table name is prefixed with AppData. All the data which was in the fields which were packaged in the extension exists in these tables.

Before uninstalling the app, I created a Location card in NAV as shown below,


Take a look at the table data in SQL for this Location record (before the app was uninstalled),


Now, take a look at the table data in the new table which was created after uninstalling the app,


This newly created table has two set of fields in it,
  • Primary Key fields (of the table in which new fields were added).
  • New Fields which were packaged in the extension.
In my demo scenario, 3 fields are created in the new table
  • Code (Primary key of Location Table)
  • Created By (Added on ID 50000 in Location Table and then packaged in extension)
  • Created Date (Added on ID 50001 in Location Table and then packaged in extension)
And last but not the least, when I uninstalled my Location extension I left DoNotSaveData unchecked so that my data is saved in SQL. See the screenshot below to know How to uninstall an extension,


If I mark DoNotSaveData parameter as True when I uninstall my app then obviously my data will not be saved in SQL and obviously no new AppData prefixed name tables will be created.

Keep Learning!!
& don't forget to post comments and doubts in comments section, I will be happy to answer them!

Sunday, October 02, 2016

NAV Debugger Keyboard Shortcuts - Tips, Tricks & Facts #2

Hi Guys. I want share knowledge about something which could save a considerable amount of time while debugging.

Developers like us debug code almost every day. So knowing the shortcuts will save us so much time!

Most of us must be knowing these shortcut keys but for those who don't, checkout this post. I hope it helps you out and debugging takes lesser time.

Lets start with Activating debugger first,


Sunday, September 25, 2016

Disable sorting in a list page in Dynamics NAV - Tips, Tricks & Facts #1

Hey Guys, I want to share tips, tricks and facts which might help us in the hour of need!
And this is the 1st post in Tips-Tricks-Facts series.

So coming back to the topic, How do we disable sorting in a List page or Subform page in NAV?

User can sort a list page on any field in standard NAV. In the example shown below, I opened Sales Order and sorted the Lines (Sales Order Subform) on "Quantity" field.


To disable this sorting, follow these steps:

Saturday, September 24, 2016

Implement Extensions in NAV

Below is the easiest way I found to implement extensions in NAV.

Let's Start!

The above diagram shows how extensions work and the idea behind bringing extensions into existence. Extensions can be installed independently on different tenants belonging to the same service and each tenant will have only the functionality of the extensions installed on it.

Extensions can co-exist in a tenant and independently as well. In the above diagram Extension 1 and 2 are installed on Tenant 1 and Tenant 2. While Extension 3 is only installed on Tenant 3 and likewise.

7 Easy steps to implement extensions in NAV are as follows:

SAP vs NAV

Hey Guys, Happy weekend!


I might be a little biased with this post. You know why!!

If the battle is SAP vs NAV, then Dynamics NAV is what you must go for. Why am I saying this so bluntly?







Tuesday, January 26, 2016

Create a Multitenant Environment in NAV

Hi Guys,


In this post, I will explain the steps involved in creating a multi-tenant environment in NAV.










Sunday, January 24, 2016

Import NAV Admin Tool and Model tools to PowerShell


Its PowerShell Time!!!

Hi Guys, 

In this post I will just show how one should import NAV admin tool to powershell so that one may work with powershell for NAV administration.





Tuesday, July 14, 2015

Microsoft Dynamics NAV 2016 Announced !!!

Hi Guys,

Microsoft has announced Microsoft Dynamics NAV 2016 at World Partner Confrence 2015.
Buckle up, There's more coming in the way of Developers like us!

I am expecting, We will have so much more to learn and explore with the next version of our favourite ERP >>> Dynamics NAV :) .


Dynamics NAV 2016 Feature update.


Check out MVP updates about NAV 2016 @


Cheers!
Ishwar Sharma

Wednesday, July 08, 2015

Error - The type NavOption is unknown.

Hi guys,

I would like to share the solution to the error which came up with me while developing a report. It is quite a silly mistake which beginners like us make often.



Solution : Go back to the C/AL code and look up that you must have typed a wrong GET statement there.

In my situation, I was doing

SalesHeader.GET("Sales Line"."Document No.");  //Wrong GET

which resulted in 'The type NavOption is unknown.' error.

I corrected my code and wrote,

SalesHeader.GET("Sales Line"."Document Type","Sales Line"."Document No.");  //Correct GET

And this issue was resolved. Hope you will find this useful.

Cheers!
Ishwar

Saturday, June 27, 2015

Column Grouping in Report in NAV 2013 R2


Hi,


Today we will learn how to Apply Column Grouping on Data in a Report in NAV 2013 R2.


Scenario : We want to analyse Customer wise Sales per Month per Year.


Sunday, June 14, 2015

Toggle Visibility in Report in NAV 2013 R2

"Toggle" is an Interactive Reporting Feature of Visual Studio. It makes Data Analysis quite interesting and easy. We will make a very simple report to demonstrate this Feature.