Tag Archives: Tip

Tip #48 | Filtering and Sorting in Journals

Time for a functional tip.

Did you know that in each Journal in Microsoft Dynamics NAV you can sort on a column, filter and then post only these lines in that particular order?

Great hidden feature!

Journals Filterering and Sorting


Tip #47 | Understanding PowerShell resultsets

Whether you like it or not, if you want to be a succesful Dynamics NAV developer in the future you have to understand PowerShell. So do I.

Currently I am working on an integration project where we make an interface between an external solution and NAV using WebServices. Idea is to ship the software with Delta files instead of a fob.

So I am running my PowerShell and notice some differences between NAV2013R2 and NAV2015.

This is what I run:


$MergeResult = Update-NAVApplicationObject -Target “C:\Users\Mark Brummel\Documents\DynamicsNAVNA71\Files\” `

-Delta “C:\Users\Mark Brummel\Documents\Delta\” `

-Result “C:\Users\Mark Brummel\Documents\New Object\” -Force


$MergeResult = Update-NAVApplicationObject -TargetPath “C:\Users\Mark Brummel\Documents\DynamicsNAVNA80\Files\” `

-DeltaPath “C:\Users\Mark Brummel\Documents\Delta\” `

-ResultPath “C:\Users\Mark Brummel\Documents\New Object 80\” -Force

As you can see the parameters have changed, but so has the resultset.

Unfortunately there is not much documentation on the resultset, only on the cmdlet parameters.

But I ran into a video from Bas Graaf taht shows this:

$MergeResult | Get-Member

This returns a list with the object members.


Name         MemberType Definition
—-         ———- ———-
Equals       Method     bool Equals(System.Object obj)
GetHashCode  Method     int GetHashCode()
GetType      Method     type GetType()
ToString     Method     string ToString()
Conflict     Property   Microsoft.Dynamics.Nav.Model.Tools.ApplicationObjectFileInfo Conflict {get;}
Error        Property   Microsoft.Dynamics.Nav.Model.Tools.ErrorInfo Error {get;}
Id           Property   int Id {get;}
ObjectType   Property   string ObjectType {get;}
Result       Property   Microsoft.Dynamics.Nav.Model.Tools.ApplicationObjectFileInfo Result {get;}
UpdateResult Property   Microsoft.Dynamics.Nav.Model.Tools.UpdateResult UpdateResult {get;}


Name MemberType Definition

—-        ———-   ———-
Equals      Method       bool Equals(System.Object obj)
GetHashCode Method       int GetHashCode()
GetType     Method       type GetType()
ToString    Method       string ToString()
PSPath      NoteProperty System.String PSPath=C:\Users\Mark Brummel\Documents\New Object 80\COD84001.TXT
Conflict    Property Microsoft.Dynamics.Nav.Model.Tools.ApplicationObjectFileInfo Conflict {get;}
Error       Property     Microsoft.Dynamics.Nav.Model.Tools.ErrorInfo Error {get;}
Id          Property      int Id {get;}
ObjectType Property string ObjectType {get;}
Result      Property Microsoft.Dynamics.Nav.Model.Tools.ApplicationObjectFileInfo Result {get;}
UpdateResult Property Microsoft.Dynamics.Nav.Model.Tools.UpdateResult UpdateResult {get;}

So as you can see (I hope) the Path is missing in NAV2013R2.

What I ended up doing is using the NAV2015 cmdlet for NAV2013R2 objects. There is probably a smart way to figure out a filename from the other properties.

Challenge for someone?


Tip #44 | First time PowerShell, enable Scripts

This post is more a reminder for myself, each time I run into this when installing NAV on customers machines I have to search for the command.

I love modern development, PowerShell, TFS, etc. But it does not make life easier to understand all these technologies.

When running PowerShell on a new machine you might encounter this error:

PowerShell Script Disabled

It is telling you that PowerShell scripts are disabled.

Enabling is easy by running the Windows PowerShell IDE as administrator and executing this:

PowerShell Script Enabled

Works for me. After this I can work with the Development Commandlets.

Tip #43 | Search

Every now and then it happens. I get the feeling I am the only one not knowing a trick. Off course I realise that is not the case so I share what I learn.

MenuSuite and Search

As you might know or should know, the MenuSuite object is used for the search in Dynamics NAV.


This is the reason why you see almost a dozen instances of Navigate when you search it. It has been defined in the MenuSuite at as many places as that.

Search Criteria

So far nothing new for me. However I was watching How Do I videos this weekend from Claus Londstrom and Alexander Totovic when I noticed them typing in this:


If you type in “rep sel sal” it will search for words containing these words. This was the thing I did not know and wanted to share.


Tip #42 | SetCurrentKey on Flowfields

I’ve already posted a few times about the possibilty of doing SETCURRENTKEY on non key (indexed) fields and doing flowfields and CALCSUMS on non SumIndexFields.

Another option that we have is to do a SETCURRENTKEY on a flowfield.

For example:


This will give the following result:


And we can check that this is correct:


Be careful. Mind performance.


Tip #41 | Smart Page Address Formatting

Ok, enough about these Design Patterns. Time for a real tip you can start using in 3 minutes.

We all know that pages use more real estate than classic forms and we are limmited to two columns. Putting two controls side by side in one column is cumbersome.

One of the things I run into a lot since I do many logistics customers (TMS) is addresses on pages. When not on Master Data you are typically not allowed to change them.

Address fields take up a lot of space, like here:


We need up to five elements to display an address. What if I tell you how to show it like this:


It is extremely easy. An address uses the room of less than 2 normal fields.

Step 1 – Add Function to Source table

Like this:


Here we return the address with a cariage return and line feed between the address and the Post code. You can make this smarter off course.

Step 2 – Add Function as Control with MultiLine property

Like this:


And voici, you are good to go!


Tip #40 | Maximum on Promoted fields on Fasttab

Ok, I admit this is not a tip, but information I found out today and could not find anywhere in documentation.

I am upgrading one of my longer running customers to NAV2015 (eventually). So one of the tasks is to make pages for these creative forms with many fields.

I thought to be smart and save some real estate by promoting a fast tab with a lot of flags. I had 8 flags, so I expected a fasttab with 8 occurances of Yes or No.


Instead, there are only 5 promoted fields. (Nee means No in Dutch).

So I started experimenting, searching on internet and testing in 2015, since I am making the pages in 2009R2 for a hybrid phase.

It seems that there is a limit of promoted fields on fasttabs to 5. Don’t ask me why. Must be something someone thought make sense as a decision for the entire NAV community.

So, Microsoft: Please remove this limitation, or at least make it like 10 or so.