Add new fields on Item Template Card

In NAV 2017, there is a Template feature, for  example in Item card.

We can setup the Template, with the default value we want to fill the master card with. For example: for Retail items, the Gen. Prod. Posting Group is RETAIL, while for Manufactured items, must be MANUFACT.

Then, each time we create a new item card, we can fill those fields with the default values, based on the template card. Saves time, and reduce human error as well.

But, the fields are limited. Luckily, we can extend the functionality by adding the new fields we need.

Continue reading

Advertisements

Description in Item Ledger Entry

As you may know, that Description in Item Ledger Entry is always blank, except if you change the Description in Journal Lines or Order Lines, so that it would be not exactly the same with the Item Description (Reference).

However, this is a standard design. But, if you want to alter this behaviour, you can change the code in:

Codeunit 22 Item Jnl.-Post Line
LOCAL InitItemLedgEntry(VAR ItemLedgEntry : Record "Item Ledger Entry")
...
 IF ItemLedgEntry.Description = Item.Description THEN
   ItemLedgEntry.Description := '';
...

Sales Orders, Partially Shipped

Maybe all of you already know how to filter the Sales Orders that partially shipped. I will write it here just for a simple reminder.

Continue reading

Incrementing Batch Name in Journal Batch Name

When using Journal, if the Journal Batch Name contains any number, then if all the lines are posted, and none lines remaining, then NAV will automatically delete the Batch Name, and create a new Batch Name by incrementing the Batch Name, ie. BATCH-01A will be BATCH-02A.

Although this feature is not used publicly by the customers, this feature is existing and no setup to manage that.

However, the code responsible for that job lies in: Continue reading

Caution! The merge cmdlets might merge incorrectly!

NAV2015 introduced new object merge functionality to ease upgrading of NAV databases dramatically. For information about the cmdlets you could start here: I reported an issue to Microsoft back in t…

Source: Caution! The merge cmdlets might merge incorrectly!

Caution! The merge cmdlets might merge incorrectly!

Grumpy NAV Dev

NAV2015 introduced new object merge functionality to ease upgrading of NAV databases dramatically. For information about the cmdlets you could start here: http://blogs.msdn.com/b/nav/archive/2014/10/03/merging-application-objects-using-windows-powershell-in-microsoft-dynamics-nav-2015.aspx

I reported an issue to Microsoft back in the middle of December 2014, and after more than one month of e-mails back and forth I got this response:

(…)
This by design and won’t be fixed. We are applying a 3-way merge on the function body including comments. The 3 merge searches for similar code when doing a merge an the out-commented code gives the best match. The customer would see a similar issue by using other 3-way merge tools like Beyond Compare. The current design also supports merging of comments which can contain valuable information that should also be merge.
(…)

I now give up, and instead of trying to convince Microsoft to fix the cmdlets, I instead wish to warn the NAV community about this…

View original post 348 more words

Using Google Maps in NAV 2016

Since Microsoft Dynamics NAV 2009 (version 6.0), there is a feature called Online Map, that we could use to open the map to show the location of the Customers, Vendors, etc.

Unfortunately, it will open Bing Maps, and we could not use others than Bing maps, for example Google Maps.

The good news is that NAV 2016 has provided the users with that flexibility to choose the map application.

To use Google Maps as your map application, it is very easy.

First, open Online Map Setup (800) page, and then click on Parameter Setup page:

online-map-setup

Online Map Setup.

There you can set the parameter used to throw the parameter from NAV to open the link.

Online Parameter Setup

Online Map Parameter Setup.

 

There is one record for default. That is for Bing maps.

Looking the pattern, we can use the pattern, to use it for Google maps. The parameters are very obvious, for example:

  • Map Service:
http://bing.com/maps/default.aspx?where1={1}+{2}+{6}&v=2&mkt={7}
  • Directions Service:
http://bing.com/maps/default.aspx?rtp=adr.{1}+{2}+{6}~adr.{1}+{2}+{6}&v=2&mkt={7}&rtop={9}~0~0
  • Directions from Location Serv.:
http://bing.com/maps/default.aspx?rtp=pos.{10}_{11}~adr.{1}+{2}+{6}&v=2&mkt={7}&rtop={9}~0~0

Looks so easy, isn’t it?

So, create a new record for your new Google Maps parameter.

How to get the address? Very easy, just open the Google maps on your browser, then copy the web address:

https://www.google.com/maps/place/10+Lake+Rd,+Wimbledon,+London+SW19+7EG,+UK/@51.42459,-0.2090028,17z/data=!3m1!4b1!4m5!3m4!1s0x487608b696bc9bf9:0x9d99e609e3434a5f!8m2!3d51.42459!4d-0.2068141?hl=en

Unfortunately, it just looks not as easy as we thought before. The address is very complex, and I could not figure it out, until I Google it and I found one good article about Google maps parameter, and these are what it will looks like:

  • Map Service:
https://www.google.com/maps/place/{1}+{2}+{6}
  • Directions Service:
https://www.google.com/maps/dir/{1}+{2}+{6}/{1}+{2}+{6}
  • Directions from Location Serv.:
https://www.google.com/maps/dir/{10}+{11}/{1}+{2}+{6}

Beware that never click on the Insert Default button on the ribbon, since it will erase ALL of the parameters, and then will overwrite it with the default Bing maps parameter!

Insert Default.png

Never click Insert Default button!

 

Look at the Online Map Substitution Parameter FactBox at the right hand corner, and it will describe what is the meaning of those number parameters:

online-map-subtitution-parameter-fact-box

Online Map Substitution Parameter FactBox

Don’t forget to change the Map Parameter Setup Code to your new Google Maps parameter:

Online Map Setup Google.png

Change Map Parameter Setup Code to your new Google parameter.

 

Finally, let’s try open the Vendor card, and then click Online Map on Navigate:

online-map-button-vendor

Click Online Map button on Vendor Card

 

And then, voila! It will open Google Maps, instead of Bing! 😉

Google Maps for Vendor 10000.png

Google Maps will open, instead of Bing