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 May 15, 2019 10:35 PM
    Edited by Jason Wilder May 16, 2019 07:49 AM

    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
    ------------------------------
    Conference-BCNAVUG_200x200


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

    TOP CONTRIBUTOR
    Posted May 16, 2019 08:53 AM
    Edited by Samuel Champoux May 16, 2019 08:53 AM
    ​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
    ------------------------------

    Conference-BCNAVUG_200x200


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

    SILVER CONTRIBUTOR
    Posted May 16, 2019 08:55 AM
    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
    ------------------------------

    Conference-BCNAVUG_200x200


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

    TOP CONTRIBUTOR
    Posted May 16, 2019 09:29 AM
    ​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
    ------------------------------

    Conference-BCNAVUG_200x200


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

    GOLD CONTRIBUTOR
    Posted May 17, 2019 02:06 PM
    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
    ------------------------------

    Conference-BCNAVUG_200x200


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

    TOP CONTRIBUTOR
    Posted May 17, 2019 06:01 PM

    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
    ------------------------------

    Conference-BCNAVUG_200x200


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

    SILVER CONTRIBUTOR
    Posted May 18, 2019 03:35 PM
    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
    ------------------------------

    Conference-BCNAVUG_200x200


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

    TOP CONTRIBUTOR
    Posted Jul 10, 2019 01:00 PM

    I thought I would add some more to this post that I started a while ago as we have been Live on NAV 2018 (on premise) for almost one month. Just a reminder, we upgraded from NAV 2016 and are now in a hybrid mode of AL and C/AL.  Most of these issues would apply if you are upgrading to BC as well.

    • This is something we missed and was a really big bummer.  Many people use Codeunit 10201 "Transfer Custom Fields" for mods.  It is a basically an empty codeunit with a bunch of functions that allow you to transfer fields from a Gen Journal to the G/L Entry or Item Journal to the Item Ledger Entry and similar things like that.  The codeunit still exists in NAV 2018 (and the latest version of BC) but all references to the functions within it have been removed.  So if you have any custom code in there it will look like it is going to work but 100% will not work!  It is super deceiving.  We missed this for about 5 days and had to go back and rebuild some missing data due to this.  The fix is to move your code to events which shouldn't be an issue.
    • This is another gotcha that is just part of the learning curve and got us in about 5 spots.  If you have an event that subscribes to something and that something changes name it breaks your event.  Your subscription codeunit will still compile so again this is quite deceiving and really is the real issue that needs to be fixed by Microsoft.  One example for us is we have an OnAfterValidateEvent on the Sales Header table on a ChargeLogic field named "Sell-to Phone No." which changed to "Sell-to Phone No. -CL-".  The event no longer worked until I went in and updated the EventPublisherElement to be the correct name. This also happens if the signature of a Publisher changes. Super important to know this.
    • We had some rapid start packages where a field was removed in the primary key which breaks the rapidstart package.  You will need to re-do the package to fix this. This is rare for this to happen but we have an add-on that removed a primary key field from the Sales Price table causing this issue.
    • RapidStart was very slow when we used it.  This post tells you how to fix it: https://dynamicsuser.net/nav/b/demiliani/posts/nav-2018-and-dynamics-365-business-central-is-rapidstart-too-slow-this-is-the-fix. Or you can simply go into Codeunit 8611 and comment out this line of code: FixIntegrationRecordIds; (only exists in 1 spot).  Not 100% sure but looks like it is related to CRM integration which we do not use.
    • Don't forget about Last Used Options and Filters on reports. You can set up filters that can be shared with the rest of the company or just yourself.  Pretty cool and has been around for a few versions.
    • In an AL Page Extension the OnDelete trigger assumes Exit(False) if you have any code in there unlike C/AL.  If you use this trigger at all in AL you need to explicitly Exit(True) if you want the record to delete.  Easy to search for this trigger in AL and add an Exit(True); to solve this issue.  Pretty easy to spot because your record won't delete.
    • There is a behavior change with Edit/View mode of all pages that really caused some headaches (totally different behavior in NAV 2016). If you do not have Modify permission for the tables of a page it will not allow you to use Edit mode (grayed out).  Normally this is ok but there are a few spots where this causes issues where Customer licenses do not have this permission.  Out of the box Customer and Vendor Ledger Entry Pages allow you to edit Due Date but this didn't work due to the new behavior.  There is a hotfix for this where indirect permission for Cust/Vendor. Ledger Entry is added to the page permission property meaning anyone with Modify =Yes or Indirect permission to these tables can now edit Due Date in those pages. Some other common places you might run into this (if you have a mod to update these records which is fairly common) are Posted Sales/Purchase Invoices, Posted Sales Shipments, Posted Purchase Receipts and Posted Sales/Purchase Credit Memos.
    • When inserting a Sales Header record via code there used to be code that called a function called InitInsert when validating the Sell-To Customer No.  It works differently and does not call that function anymore.  So this code no longer works:

          SalesHeader."Document Type" := SalesHeader."Document Type"::Order;

          SalesHeader.Validate("Document Date","Document Date");

          SalesHeader.VALIDATE("Sell-to Customer No.","Sell-to Customer No.");

          SalesHeader.INSERT(TRUE);

               Replace with something like this:

          SalesHeader."Document Type" := SalesHeader."Document Type"::Order;

          SalesHeader.INSERT(TRUE);

          SalesHeader.Validate("Document Date","Document Date");

          SalesHeader.VALIDATE("Sell-to Customer No.","Sell-to Customer No.");

          SalesHeader.MODIFY(TRUE);

    • Before, during and after an upgrade someone will be doing a lot of debugging to solve issues.  Just a reminder that your service tier doing the debugging should have "Enabled Buffered Insert" = False.  Otherwise sometimes you will go crazy trying to understand why the debugger is not stopping in the correct spot where the actual error is.  I truthfully thought NAV was broken until I remembered to turn this option off.
    • Be prepared to restore Defaults on Role Centers, Pages and Ribbons as the user personalization is just a bit buggy.  I have heard this from other companies as well so it is not just us because we are running AL and C/AL.  Always try to Restore Defaults at the lowest level if you can.  For example you can Restore Defaults on a single FastTab which won't affect anything else on the page such as other fasttabs or the ribbon.
    • If you use the Transmit button in a payment journal (North America version of NAV only I think) it has totally changed since NAV 2016.  It is actually quite a bit better but does require a bit of setup.  There is now a new button on the Navigate part of the ribbon called Generate EFT Files which is used to create your ACH file to upload to the bank.  The entire thing is built off of setup tables know so you can easily change the specs without having to touch any code.  I really like this but just allow yourself a little time for setup and to confirm the new file with your bank.
    • Just a reminder that once you go Live make sure you monitor the Application Log in the Event Viewer on each of your service tiers.  There could be all sorts of interesting errors that are not being displayed in NAV here.
    • Our To-Increase Food add-on had quite a few mistakes in the code that really caused us some issues.  This is most likely because we did not have their latest and greatest version of their code.  If you find yourself in the same situation then send me an email and I can tell you the 5 or so spots that really caused us problems or make sure you have their latest release when you merge code.  Fortunately, we found all these issues prior to go live.
    • We found that in certain (very common having to do with Department or Project filters) scenarios our Account Schedules were painfully slow after going Live on NAV 2018 (much slower than NAV 2016).  Turns out there is an index on the G/L Entry table that is disable by default in NAV 2018 and later versions.  We re-enable this index like in previous versions and problem was solved.  Table 17 G/L Entry index: G/L Account No.,Business Unit Code,Global Dimension 1 Code,Global Dimension 2 Code,Posting Date.  Of course this depends on your data and how you use it but was definitely needed for us.
    • Task Scheduler was introduce in NAV 2017 so this was new to us in NAV 2018.  We have 150 Job Queue entries that run on all sorts of recurring schedules.  An entire post could be spent on this subject but I will try abbreviate:
      • Depending on the version of NAV you are upgrading to make sure you have the hotfix for this area!  If not you will experience really bad deadlocking in the Job Queue Entry and Schedule Tasks tables that almost makes the Job Queue unusable (depends on the number of Job Queue Entries you have). 
      • The "Job Queue Category Code" is essential to use to prevent locking but at the same time use it as little as possible.  You need to use the "Job Queue Category Code" to make other jobs wait so they won't lock each other.  For example if you are posting invoices and running Adjust Cost and updating Low Level Code you want to make sure they are on the same "Job Queue Category Code" so they don't all run at the same time and lock each other.
      • The reason you don't want a ton of Job Queue Entries with the same "Job Queue Category Code" is based on how it works behind the scenes.  When one Job Queue Entry is processing the others that are waiting are not truly waiting but instead there Earliest Start Date/Time is being updating based on a random number of seconds (not joking it is random) which in turn deletes and recreates the task.  Every 5 seconds or so the jobs waiting in line will do this.  It creates a bit of overhead in these tables (Job Queue Entry and Scheduled Task) so it should be avoided if possible.  Generally most jobs do not require a "Job Queue Category Code (such as sending emails, checking data, writing files) so they can all execute at the same time if need be.  The number of jobs that can fire off at once is controlled in the service tier by a Task Scheduler property called "Maximum Concurrent Running Tasks".  Default is 10 but we have set ours to 15 since at the top of each hour we commonly have 10 to 15 jobs ready to go.
      • The Earliest Start Date/Time just doesn't work well out of the box.  If you set up something to run at 5 past each hour it will almost immediately get off track and won't be running at 5 past next time you look at it.  Fortunately Microsoft has added an event to Codeunit 448 Function CalcNextRunTimeForRecurringJob (this event is in BC only so you will need to get it from there first) so we can override this functionality.  If you are interested I have a slick function that will totally fix the issues with Earliest Start Date/Time.  Email me and I will discuss or send you the code.
    • When you go to figure out issues that come up post-upgrade (or during testing) don't forget to look at the latest and greatest version of objects to see if the issue was already fixed.  Many issues were fixed in BC and I could just grab the code from there.  I can't even begin to tell you how nice it is to have Docker installed and running so I can see the latest BC objects and the latest NAV 2018 release very easily.  If you are a developer it is worth installing and learning this tool (Docker).
    • One last comment about Hybrid mode with AL and C/AL.  A page extension in AL can see most of the controls and functions etc… on a C/AL page (not variables, unfortunately) but a C/AL page cannot see anything such as a function in AL.  If you are going to go hybrid mode at any point you will want to ponder this statement a bit as you plan your strategy as to what pieces you want to move to AL and what pieces you want to remain in C/AL.  Though more challenging and time consuming than a regular upgrade if I were to do it again I would go with Hybrid mode.  My next upgrade will be quite a bit easier since I have already started the transition to AL.

     



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

    Conference-BCNAVUG_200x200


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

    SILVER CONTRIBUTOR
    Posted Jul 10, 2019 01:46 PM

    Jason,

    Thanks for keeping up with this. It will be extremely helpful to us when we make the move to 2018 (2019?). You truly are a Trail Blazer!

     

    Nick Yancer

    NAV Developer

     

    image001.jpg@01CB54C6.E14BCC50

    3150 SW 15th Street | Deerfield Beach, FL 33442

    [o] 954-427-5711  x262 | [c] 561-523-1097

    nyancer@amt.com www.amt.com

    FBTwitterlinkedin-2-icon

     

     

     




    Conference-BCNAVUG_200x200


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

    TOP CONTRIBUTOR
    Posted Jul 11, 2019 12:48 PM
    Jason any input on why the specific cumulative update #4 instead of a higher number.  We are upgrading and I as well chose #4 however our partner said they preferred #16. Just wondering if any specific spec or require pointing you to CU 4?​​​

    ------------------------------
    Ronald McVicar, IT Software Mgr
    NSP (Quality Meats)
    nspproteins.com
    ------------------------------

    Conference-BCNAVUG_200x200


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

    TOP CONTRIBUTOR
    Posted Jul 11, 2019 02:49 PM
    Ronald, I started the upgrade back in Sept 2018 and then had to pause for about 4 months due to our busy season.  I always start with one of our add-on's (To-Increase Foods) as our base and at the time this was what they had.  Certainly if you are starting now, go with the most recent update though sometimes it can be a little tricky if add-on's are of built on a lesser cumulative update.  Many of the issues I have mentioned will already be solve if you go with the latest cu.  If you want to get on a call to discuss things further, just send me a private message.

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

    Conference-BCNAVUG_200x200


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

    TOP CONTRIBUTOR
    Posted Jul 11, 2019 03:33 PM
    Jason,
    this is all good.  And this made your situation clear.  Thank for contributing.  You are adding value.  Thank you.

    ------------------------------
    Ronald McVicar, IT Software Mgr
    NSP (Quality Meats)
    nspproteins.com
    ------------------------------

    Conference-BCNAVUG_200x200


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

    TOP CONTRIBUTOR
    Posted Jul 24, 2019 04:56 PM
    Last post on this thread as it may be a dry subject to people but something just came up that is so worth mentioning when you upgrade to any version of NAV where you are using events (Publishers and Subscriptions)

    We just found another subscription event that wasn't executing (I had mentioned somewhere in a bullet above).  It compiles and there is no sign of an error, which makes it very difficult to find these.  Turns out the subscription event wasn't firing because there was a parameter that was spelled wrong (Publisher has SalesInvoiceHeader but subscription had SalesInvHeader).  When trying to figure this out I came across something that I have seen before but didn't really think to use it.  This is super important!  From the C/AL developer environment, go to Tools, Debugger, Event Subscriptions (if you use events you have most likely been in here a bit).  Filter on Error Information <> ''.  This will identify events that are not working (even though you think they are working).  It is so important that I am considering writing a job to alert me based on the same filter.  The other field to be wary of us is Active = False.  This is another good filter to use.  Make sure you look at this table before going Live as it will save you a ton of headaches.

    A few last things:
    • There is a new developer command called GetCallStack which is super handy especially for any integrations.  An example so you can see how it is used is in the Job Queue Entry table in BC.

    • To be able schedule reports there are a bunch of permissions that are needed (nothing weird about that).  The weird part is the user won't get a permission error or anything, it just won't ever execute once they have scheduled it.  You will see some records in the Job Queue Entry but thehScheduled field will be No.  Look at the time of the Job Queue Entry and then go look on your service tier hosting the task schedule and check the Event Viewer at the same time.  You will see the permission error in there (3 errors all in a row).  Add the permission (probably to FOUNDATION) and try again.  These are the permissions a user will need to schedule a job (I think):
      •      Table 471 Read
      •      Table 472 Read/Insert/Modify/Delete
      •      Table 474 Read/Insert/Modify
      •      Table 1261 Read
      •      Table 2000000175 Read/Insert/Modify/Delete


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

    Conference-BCNAVUG_200x200


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