Open Forum

Expand all | Collapse all

A few tips when upgrading to NAV 2018

  • 1.  A few tips when upgrading to NAV 2018

    TOP CONTRIBUTOR
    Posted 5 days ago
    Edited by Jason Wilder 5 days ago

    We are upgrading from NAV 2016 to NAV 2018 Cum Update 4 on Premise (executable version is a little higher at 11.0.26401.0).  We have 5 add-ons and a ton of customization's:

    • To-Increase Foods
    • ChargeLogic
    • Avalara
    • Beck EDI
    • Continia Expense Mgt

    Also we are going with a Hybrid of C/AL and AL.  I have moved all base page mods to Page Extensions in AL except for a handful of things that can't be done in AL yet.  We use the Windows Client exclusively so no Web Client yet.

    Here are a few things we have come across during the upgrade that I wanted to share and hope others will add on to this. 

    • If you are going to use AL, make sure you use the executable version (11.0.26401.0) or above as that has a fix that allows you to use any object number in the 50000 to 99999 range for Page/Table extensions. If you go with an earlier you can only create page extensions on objects you are license for usually in the 50000 range.  Basically this means you will probably need to purchase some more page/table objects to do page/table extensions.
    • You will need to decide which add-ons will be in AL versus C/AL. If the add-on comes in a AL extension then consider using it but for NAV 2018 most do not have an AL version.
    • There is an out of the box bug that exists in the Cronus database for this version. When starting up the service tier there are 3 similar errors, one example is "Metadata was changed for table 18 (Customer) due to invalid characters.".  Here is a post which explains all about this and how to fix it: https://forum.mibuso.com/discussion/65264/nav-2016-startup-error-metadata-was-changed-for-table-due-to-invalid-characters.
    • It is possible to have 2 versions of NAV installed on the same machine (NAV 2016 and NAV 2018 in our case) since you might want to install the new version ahead of time to use for testing and make go live easier. Just be aware that the Send to Excel function (Ctrl E) will only work on one of the versions, whichever one has the Excel Add-in installed most recently.
    • If you are using the task scheduler and have multiple service tiers, make sure you only have one enabled.
    • If you have a custom page that uses the Business Chart control add-in (The ControlAddIn property on one of the controls will look like this: Microsoft.Dynamics.Nav.Client.BusinessChart; PublicKeyToken=31bf3856ad364e35) you will need to remove this and re-select it from the dropdown list. It make look the same but will be the updated version of the add-in.  Otherwise your page won't compile.
    • If you have To-Increase Food there is some missing code in Codeunit 80 function FillInvoicePostingBuffer that has to do with taxes. Email me and I can give you the details.
    • In C/AL if you put code in the AssistEdit property it automatically shows the assist edit button to the right of the field. In AL it does not do this so you will need to set the AssistEdit property to true make this happen.
    • A colleague gave me a tip on Subscription codeunits. By now you should have tried to move as much of your code as you can to subscription events.  NAV needs to load these codeunits into memory each time something in it is called.  Simply change the SingleInstance property on the codeunit to Yes so it stays in memory all the time.  Since Subscription events are always local this shouldn't mess up anything.   I can't say either way that this has improved performance but it certainly has not caused any issue.  Remember though that you will need to restart the service tier anytime you make a change to one of these codeunits which is good practice anyway.
    • In the NAV 2018 version listed above there is a ridiculous bug in a page extension when using the OnAfterGetCurrRecord trigger. The trigger only works in AL if there is something in that trigger of the corresponding C/AL page.  If there is no code in the C/AL page simply add a comment to the trigger and the AL side will immediately start working.
    • When doing a page extension some controls seem that they cannot be referenced in an AL page extension. Say for example on Page 42 you want to modify the Sales Hist. Sell-to FactBox to be invisible by default.  You are unable to find the factbox name in AL to do this.  That's because the name of the factbox on page 42 is the default name <Sales Hist. Sell-to FactBox> (enclosed in brackets).  Unfortunately you will have to reference this based on its ID#.  So instead reference Control1903720907 and you can then make it Visible = False.  You will find this is the case on a handful of controls.
    • If you need to debug the task scheduler for Job Queue Entries here is a quick tip. At the start of Codeunit 448 OnRun add a line of code Sleep(10000).  This will give you 10 seconds to see the session and start debugging on this session before it goes away.
    • Before starting the task scheduler I noticed there were a bunch of records in the Scheduled Task table that were not related to anything I cared about. I cleared these records which reduces deadlocking when you start of the task scheduler for the first time.
    • I think everyone knows this one but I will mention anyway. If you have 2 job queue entries such as Posting Invoices and running Adjust Cost they will certainly lock each other if run at the same time.  To prevent them from locking each other assign them to the same Job Queue Category Code which will run one job and have the other wait for the first to finish.
    • We have found (maybe this is because we are running in Hybrid AL C/AL mode) that sometimes the ribbon looks weird when you go into a screen the very first time. Simply customize the ribbon and restore defaults and things seem to usually get back to normal.
    • We have one Profile in NAV 2016 that we had an administrator "configure" for the users assigned to that profile. We soon learned after doing this that if someone configures an action by hiding it for example, the users cannot ever show that action again.  We do not like this behavior so in NAV 2018 we decided to do away with the Configuration of that profile.  A colleague of mine found a super easy way to do this.  Go to Profiles, Edit your Profile then on the ribbon go to Actions, Clear Configured Pages.
    • This one is just weird. In NAV 2018 when a user goes into a Sales Order where Status = Open it automatically Calculates Invoice discounts.  So this means that any user that is normally allowed to only Read a Sales Order now has to be given Sales Header and Sales Line Modify permission.  We certainly did not want to give just about everyone this permission so I commented out the code on Page 46 under the CalculateTotals function from the top of the function to (and including) this line: CalcInvDisc;.
    • Another weird thing is that whenever you leave a document that is not posted you get a confirm message asking if you really want to leave the screen. This is a super annoying message and I can't imagine why they put this here.  Fortunately, there is a way to disable this through setup.  There is a page called My Notification which is specific per user.  You can go in there and unclick the line "Warn about unposted documents.".  Check out some of the other options while you are in there and remember these are user specific settings.
    • Lastly I have lots to say about Upgrade Toolkits and Upgrade Codeunits but I will try to limit it:
      1. The Microsoft Upgrade Toolkit isn't perfect depending on your data. Part of upgrading to NAV 2017 is to change the way the Item Category Code and Product Group Code is used.  Product Group Code is being depreciated and moved into Item Category Code in a way where you can have unlimited levels.  Because of this you can no longer have Product Groups that are the same even if they are under a different Item Category. So this structure:

                            Toys

                                Red

                                Blue

                           Stuff Animals

                               Red

                               Blue

                    No longer works and Becomes:

                           Toys

                               Red

                               Blue

                           Stuffed Animals

                               Red2

                               Blue2

                   2. After the restructure of Item Category Code the upgrade toolkit updates any related document lines plus item ledger. This can be a very lengthy process based on your data.  Adding some keys temporarily to the document lines such as Sales Shipment Line and Sales Invoice Line can greatly reduce the time in the data upgrade.  The key you would want to add is Type,No. for the Document Line tables.

                   3.Make sure you get your upgrade toolkits for your add-ons. Some might not have one even though you might need it.  I had to create  a couple to make the Sync Schema For All Tables and Data Upgrade steps to work without issue.

                   4.When you "Sync Schema for All Tables" the first time do not use the Force option as it will skip the first step of the upgrade which is to move or copy data to temporary tables (TableSyncSetup Function) so you can move it back later on.  This is very important since if you do force it will simply remove or delete data without the correct instruction to save it first so you can do something with it later.  Make sure you really understand "Sync Schema for All Tables", "Data Upgrade" and the different types of upgrade codeunits before doing any of these steps.

                   5.Can't hurt to turn off change log while you run the Data Upgrade. Could increase your speed a bit.


    Please add your own tips or tell me if I have anything wrong with these and I will correct it.



    ------------------------------
    Jason Wilder
    Senior Application Developer
    Stonewall Kitchen
    York ME
    ------------------------------


  • 2.  RE: A few tips when upgrading to NAV 2018

    TOP CONTRIBUTOR
    Posted 5 days ago
    Edited by Samuel Champoux 5 days ago
    ​Thanks Jason, very good tips.
    I found the warnings about leaving unposted documents annoying too but I just commented the code :)

    Also, we use NAV2013 and 2018 on the same computer, and our Excel exports work on both.
    The trick is to not install any excel add-in. NAV will then download you the file, instead of opening Excel directly.

    ------------------------------
    Samuel Champoux
    IT Director
    Drummondville QC Canada
    ------------------------------



  • 3.  RE: A few tips when upgrading to NAV 2018

    Posted 5 days ago
    Thanks for taking the time to document this Jason. I am saving this for our eventual upgrade to NAV 2018. I'm sure some of these issues will be handled in future releases, but good to know about them if they are not corrected.

    ------------------------------
    Nick Yancer
    NAV Developer
    Advanced Media Technologies
    Deerfield Beach
    ------------------------------



  • 4.  RE: A few tips when upgrading to NAV 2018

    TOP CONTRIBUTOR
    Posted 5 days ago
    ​Awesome, Jason!  Thank you.

    Here's a sceen shot of the My Notifications settings:

    My Notifications

    ------------------------------
    Lewis Rosenberg
    IT Manager
    Mars Fishcare
    Chalfont PA
    ------------------------------------------------------------------------
    BCUG/NAVUG All-Star
    BCUG/NAVUG Board of Advisors, Chairperson
    BCUG/NAVUG Programming Committee

    Twitter: @RosenbergL
    LinkedIn: https://www.linkedin.com/in/rosenbergl
    ------------------------------------------------------------------------

    NAVUG/BCUG Summit (navugsummit.com)
    Orlando, FL - October 15-18, 2019
    ------------------------------



  • 5.  RE: A few tips when upgrading to NAV 2018

    GOLD CONTRIBUTOR
    Posted 4 days ago
    Good tips Jason, thanks and good luck with GoLive! I would be very careful when using the single instance property on codeunits. Keep in mind that in a single instance codeunit, even the local variables will retain their last set state until changed or when the user logs out of NAV. If this is a pattern that you follow, and another developer comes along who doesn't understand the ramifications of single instance codeunits and their singleton behavior, they may inadvertently introduce some bizarre bugs. I'm not sure if that risk is worth it if there is no perceived performance gain. Especially with the web and modern client being the only client starting in the Fall. Also, I believe ALL objects stay in memory once they are called, regardless of the single instance property, limited only on how your cache properties are set on the service tier.

    ------------------------------
    Jon Long
    Director of ArcherPoint-Upgrades
    ArcherPoint Inc.
    GA
    ------------------------------



  • 6.  RE: A few tips when upgrading to NAV 2018

    TOP CONTRIBUTOR
    Posted 3 days ago

    Jason good document. Everyone is contributing nicely.
    One thing when full testing is done and before the go live date.
    I strongly suggest uninstalling NAV 2016 or prior version from the server/workstations (With a reboot).
    Make sure NAV 2018+ is installed correctly and functioning.
    I've heard old Dll's were still in memory and Coding still pointing to old OCX/DLL/System objects.

    Good luck and keep us posted with the testing and how many instances are you using?

    1. NAVserver 1 and/or NAVserver 2

    2. Job queue Instances.

    3. Load Balancer if any.

    4. Speed on database.

    5. Also are you purging the Transaction log to increase the speed from the SQL database.

    Good Luck, Thank you. 



    ------------------------------
    Geovanny Fuentes
    San Diego CA
    ------------------------------



  • 7.  RE: A few tips when upgrading to NAV 2018

    SILVER CONTRIBUTOR
    Posted 3 days ago
    On the Reporting FastTab on the General Ledger Setup screen in NAV 2018, you can select which Account Schedule to use for your default balance sheet, income statement, etc.  You can select your custom Account Schedule or stay with the "M-" built-in Schedule.  There should be a warning displayed because:  If you "Generate Account Schedules," NAV will replace/update whatever Schedule that is shown in the GL Setup with NAV's "M-" version.


    For example, if you adjust your balance sheet G/L Account Categories and then select "Generate Account Schedules" with the intention of updating the M-BALANCE Account Schedule, all Account Schedules named in the GL Setup's Reporting tab will be changed to conform to the built-in versions.  If you had created a custom income statement Account Schedule and selected it in GL Setup as your Income Statement, it would be lost.

    ------------------------------
    Alan Hyde
    Controller
    National Azon
    Troy MI
    ------------------------------



If you've found this thread useful, dive deeper into User Group community content by role