Knowledge Base ID | Title | Release date | Build no. | Local versions included |
4052194 | Cumulative Update 25 for Microsoft Dynamics NAV 2016 | November, 2017 | 49424 | AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, IN, NA, NL, NO, NZ, RU, SE, UK |
4045670 | Cumulative Update 24 for Microsoft Dynamics NAV 2016 | October, 2017 | 49326 | AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, IN, NA, NL, NO, NZ, RU, SE, UK |
4040571 | Cumulative Update 23 for Microsoft Dynamics NAV 2016 | September, 2017 | 49146 | AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, IN, NA, NL, NO, NZ, RU, SE, UK |
4037308 | Cumulative Update 22 for Microsoft Dynamics NAV 2016 | August, 2017 | 48992 | AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, IN, NA, NL, NO, NZ, RU, SE, UK |
4034491 | Cumulative Update 21 for Microsoft Dynamics NAV 2016 | July, 2017 | 48822 | AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, IN, NA, NL, NO, NZ, RU, SE, UK |
4024641 | Cumulative Update 20 for Microsoft Dynamics NAV 2016 | June, 2017 | 48628 | AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, IN, NA, NL, NO, NZ, RU, SE, UK |
4021395 | Cumulative Update 19 for Microsoft Dynamics NAV 2016 | May, 2017 | 48466 | AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, IN, NA, NL, NO, NZ, RU, SE, UK |
4018438 | Cumulative Update 18 for Microsoft Dynamics NAV 2016 | April, 2017 | 48316 | AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, IN, NA, NL, NO, NZ, RU, SE, UK |
4014100 | Cumulative Update 17 for Microsoft Dynamics NAV 2016 | March, 2017 | 48067 | AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, IN, NA, NL, NO, NZ, RU, SE, UK |
4011762 | Cumulative Update 16 for Microsoft Dynamics NAV 2016 | February, 2017 | 47864 | AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, IN, NA, NL, NO, NZ, RU, SE, UK |
3216191 | Cumulative update 15 for Microsoft Dynamics NAV 2016 | January, 2017 | 47838 | AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, IN, NA, NL, NO, NZ, RU, SE, UK |
3209072 | Cumulative update 14 for Microsoft Dynamics NAV 2016 | December, 2016 | 47444 | AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, IN, NA, NL, NO, NZ, RU, SE, UK |
3202891 | Cumulative update 13 for Microsoft Dynamics NAV 2016 | November, 2016 | 47256 | AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, IN, NA, NL, NO, NZ, RU, SE, UK |
3193868 | Cumulative update 12 for Microsoft Dynamics NAV 2016 | October, 2016 | 47042 | AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, IN, NA, NL, NO, NZ, RU, SE, UK |
3188240 | Cumulative update 11 for Microsoft Dynamics NAV 2016 | September, 2016 | 46773 | AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, IN, NA, NL, NO, NZ, RU, SE, UK |
3182131 | Cumulative update 10 for Microsoft Dynamics NAV 2016 | August, 2016 | 46621 | AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, IN, NA, NL, NO, NZ, RU, SE, UK |
3172549 | Cumulative update 9 for Microsoft Dynamics NAV 2016 | July, 2016 | 46290 | AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, RU, SE, UK |
3166287 | Cumulative update 8 for Microsoft Dynamics NAV 2016 | June, 2016 | 46045 | AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, RU, SE, UK |
3157492 | Cumulative update 7 for Microsoft Dynamics NAV 2016 | May, 2016 | 45834 | AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, RU, SE, UK |
3151017 | Cumulative update 6 for Microsoft Dynamics NAV 2016 | April, 2016 | 45480 | AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, RU, SE, UK |
3145855 | Cumulative update 5 for Microsoft Dynamics NAV 2016 | March, 2016 | 45243 | AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, RU, SE, UK |
3139364 | Cumulative update 4 for Microsoft Dynamics NAV 2016 | February, 2016 | 44974 | AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, RU, SE, UK |
3130298 | Cumulative update 3 for Microsoft Dynamics NAV 2016 | January, 2016 | 44365 | AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, RU, SE, UK |
3121038 | Cumulative update 2 for Microsoft Dynamics NAV 2016 | December, 2015 | 43897 | AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, RU, SE, UK |
3106089 | Cumulative Update 1 for Microsoft Dynamics NAV 2016 | November, 2015 | 43402 | AT, AU, BE, CH, CZ, DE, DK, ES, FI, |
If you find this Blog Helping. Kindly Please Comment & Subscribe for new & latest updates on Microsoft Dynamics NAV & 365BC..!!
List of Release for Dynamics Navision 2016 including Build No. & with localization.
Microsoft Navision 2013 and Microsoft Navision 2013 R2 has came to an end.
Today, Cumulative Update 56 for Dynamics NAV 2013 and Cumulative Update 49 for Dynamics NAV 2013R2 has been released. But these will be the last cumulative updates for this two Dynamics NAV versions with just a few platform and application hot fixes.
Why the last time? Well, from January 9th 2018, Microsoft will finish with the mainstream support for these NAV versions. Customers with active service plan can continue to use already released hot fixes and help via Customer Service. But I think that the best idea for all these customers is to upgrade their solution. And not only for owners of these versions. I think that the best solution for all clients is to stay current with new versions all the time.
And just to be precisely, Extended Support will continue with existing until :
January 10th 2023 for Dynamics NAV 2013
January 9th 2023 for Dynamics NAV 2013 R2
Why the last time? Well, from January 9th 2018, Microsoft will finish with the mainstream support for these NAV versions. Customers with active service plan can continue to use already released hot fixes and help via Customer Service. But I think that the best idea for all these customers is to upgrade their solution. And not only for owners of these versions. I think that the best solution for all clients is to stay current with new versions all the time.
And just to be precisely, Extended Support will continue with existing until :
January 10th 2023 for Dynamics NAV 2013
January 9th 2023 for Dynamics NAV 2013 R2
XMLPort Generator Tool for Navision
Recently, I need to import some flat text files into NAV into completely new tables. So first, I created a table containing all the fields in the correct order. Next I had to create an XMLPort to import the values. But, there were over 200 fields in my newly created table, and had 3 more tables with the same thing.
So, there is a little tool available created in .NET to read a table from navision & generate a XMLPort for the same while saving it as text file for importing into Development Environment.
Given below is the link for Downloading the XMLPort Generater Tool
https://drive.google.com/file/d/1dLcWqXWAxN4Araj6SUR3A-3S_xBcteQP/view?usp=sharing
Given below are the steps for how to Run the tool :-
1. Export your table to text file.
2. Run the XMLPort Generater Tool.
3. Copy all the text from the exported Table text file & Paste all of it on the left side of the Tool.
4. Please Mention some details like Table ID, Table Name, XML ID etc.
5. Now click on generate XML Port (It will generate a text onto the right side of the column on the tool)
6. Now finally click on Save to file for saving the generated text into a text file on to the required location.
Note -
- XMLPort is always import, of type variable text (no xml)
- If you don’t supply anything in the fields, it will create an xmlport of type variable text to your source table.
- XMLPort name is by default set to “IMPORT %1” with %1 being the source table name
Now Import that generated Text file of XML port into the Development Environment and we are good to go.
Hope this helps in most of the cases where it can save some time & effort...!!
So, there is a little tool available created in .NET to read a table from navision & generate a XMLPort for the same while saving it as text file for importing into Development Environment.
Given below is the link for Downloading the XMLPort Generater Tool
https://drive.google.com/file/d/1dLcWqXWAxN4Araj6SUR3A-3S_xBcteQP/view?usp=sharing
Given below are the steps for how to Run the tool :-
1. Export your table to text file.
2. Run the XMLPort Generater Tool.
3. Copy all the text from the exported Table text file & Paste all of it on the left side of the Tool.
4. Please Mention some details like Table ID, Table Name, XML ID etc.
5. Now click on generate XML Port (It will generate a text onto the right side of the column on the tool)
6. Now finally click on Save to file for saving the generated text into a text file on to the required location.
Note -
- XMLPort is always import, of type variable text (no xml)
- If you don’t supply anything in the fields, it will create an xmlport of type variable text to your source table.
- XMLPort name is by default set to “IMPORT %1” with %1 being the source table name
Now Import that generated Text file of XML port into the Development Environment and we are good to go.
Hope this helps in most of the cases where it can save some time & effort...!!
Microsoft Dynamics NAV Keyboard Shortcuts
Keyboard | Action |
Alt | Display shortcut keys in the ribbon |
Alt+F2 | Toggle to display/hide FactBoxes |
Alt+F3 | Filter to currently selected field (e.g. customer name) |
Alt+F4 | Close window or close program |
Alt+F6 | Collapse or expand the active frame (e.g. expand “Invoicing” section in sales order) |
Alt+F12 | Optimize space for the current page |
Alt+Left Arrow | Go to the previous window in the navigation history |
Alt+Right Arrow | Go to the next window in the navigation history |
Alt+Enter | Move to the line below |
Ctrl+F1 | Collapse or expand the ribbon |
Ctrl+F2 | Create a new document |
Ctrl+F3 | Select Search pages |
Ctrl+F4 | Open related list editor (e.g. open posting group when field selected in sales order) |
Ctrl+F7 | View entries |
Ctrl+F9 | Release document |
Ctrl+F11 | Reconcile or split lines |
Ctrl+F12 | Select the address bar |
Ctrl+C | Copy |
Ctrl+G | Go to |
Ctrl+E | Export to Microsoft Office Excel |
Ctrl+L | Show links |
Ctrl+N | Create a new record |
Ctrl+O | Open the company |
Ctrl+P | |
Ctrl+V | Paste |
Ctrl+W | Export to Microsoft Office Word |
Ctrl+X | Cut |
Ctrl+Z | Undo |
Ctrl+Page Down | Display next document or card in a list |
Ctrl+Page Up | Display previous document or card in a list |
Ctrl+Up Arrow | Move up while the selected line stays selected |
Ctrl+Down Arrow | Move down while the selected line stays selected |
Ctrl+Left Arrow | Move to the first field on a line |
Ctrl+Right Arrow | Move to the last field on a line |
Ctrl+Alt+F1 | Open the About this Page/Report window (shortcut is commonly used by other programs e.g. Intel graphics. You may have to disable these first.) |
Ctrl+Delete | Delete the selected line |
Ctrl+Home | Move to the first line in a list |
Ctrl+End | Move to the last line in a list |
Ctrl+Enter | Save and close window (equivalent to choosing the OK button) |
Ctrl+Insert | Insert new line |
Ctrl+Shift+F3 | Select Limit totals to (e.g. chart of accounts) |
Ctrl+Shift+A | Clear all filters (e.g. when opening report) |
Ctrl+Shift+C | Copy Rows |
Ctrl+Shift+D | Show dimensions |
Ctrl+Shift+E | Edit list |
Ctrl+Shift+R | View list |
Ctrl+Shift+Q | Collapse/expand a line in a hierarchy |
Ctrl+Shift+V | Paste rows |
Ctrl+Shift+W | Open current page (e.g. sales orders) in a separate window |
Ctrl+Shift+Enter | Save and close the window (e.g. saves new item being created) and opens a new window (e.g. new item) |
F1 | Open Help |
F2 | Edit |
F3 | Select Type to filter (field filter) |
F4 | Drop-down or look up to select |
F5 | Refresh the active window |
F6 | Go to the next frame |
F7 | Display statistics |
F8 | Copy the field above |
F9 | Post |
F10, Alt | Select the menu bar and display access keys |
F12 | Select the navigation pane |
Shift+F1 | View error message |
Shift+F3 | Select Show Results (FlowFilter) |
Shift+F4 | Open a lookup window (from an ellipsis button) |
Shift+F6 | Go to the previous frame |
Shift+F7 | Open the related card |
Shift+F8 | Drop-down or look up to view |
Shift+F9 | Post and print |
Shift+F10 | Display a shortcut menu |
Shift+F11 | Apply entries, get source documents, or get warehouse documents |
Shift+F12 | Open the Role Center from the navigation pane |
Shift+Tab | Move to the previous field |
Tab | Move to the next field on non-line FastTabs |
Delete | Clear selected text |
Esc | Close the window or undo the data entry |
End | Move to the last field on a line |
Home | Move to the first field on a line |
Enter | Move to the next editable field |
Add Fields to the Item Tracking Lines
This blog post is to describe how fields can be added to the Item Tracking Lines in Microsoft Dynamics NAV. Adding additional fields to this page is a common requirement; it could for example be to add a vendor lot number, some quality measurements, a manufacturing date or any other type of property that should be stored against an inventory lot or serial number.
When you first look at it seems like a simple modification but it is actually a bit (or a lot) more involved than just adding the field to the table and the page.
The Item Tracking Page is in Dynamics NAV built using a temporary table called Tracking Specification, when the page is opened there is code that populate the table with data (if there is anything to display) and when the page is closed there is code that updates the data in a different table (if there is anything to update). That different table is the reservation entry table.
Don’t ask me why it was designed like this. 🙂 It’s been like that as far as I can remember and I have learned to live with it, but I am not sure if I am a big fan of it.
Then during posting the information in the reservation entry table is retrieved and is part of the posting routine. The posting routine populates a temporary Item Journal Line table with one record per lot or serial number and this then creates the Item Ledger Entry records.
The good part with this design is that the item tracking lines page is the same across the entire application, whether you are on a purchase order, a warehouse receipt, a sales order or in an item journal, etc. it is the same page that is opened.
In this example I will add a new field called Vendor Lot No. with the intention to enable capturing the vendor’s lot number against an internal lot number in Dynamics NAV (which is a common requirement).
I start with adding the field to the tables involved in this customization, I make it a code field and 50 characters long (to be on the safer side).
The tables where this field needs to be added are (you can copy/paste the field between the tables):
336 – Tracking Specification
337 – Reservation Entry
83 – Item Journal Line
32 – Item Ledger Entry
Next would be to add the field to the Item Tracking Line page (which is page 6510).
You will also need to add code to this page to control when the field is editable and to store the value in the reservation entry table.
The editable or not editable feature is because the same page is used for both inbound and outbound inventory transactions, and it is only for inbound transactions you want the field to be editable. And in the case of an inbound transaction it should only be editable if the lot number doesn’t already exists (e.g. when you add to an existing lot you don’t want a different vendor lot number). Since this is exactly how the expiration date works, I will simply piggyback on that functionality. I do this by simply setting the Editable property on the new vendor lot no. field to “Expiration DateEditable”.
If you want to use a different logic to define if the new field should be editable or not you will have to define a new global variable and write new code on the page to set it to true or false. This can be fairly easy or very complicated, but you have some examples to use if you search the code on the page (and there is a lot of code in the item tracking lines page).
To test this I can go to an item journal, add a positive adjustment for a tracked item and open the item tracking lines. We then see that the vendor lot no. is visible and can be edited if we add a lot number that does not already exist in the database but if we add to an existing lot is not editable. Then when we do a negative adjustment it is not edible. Perfect! 🙂
Next step is to make sure the data in the new field is stored in the reservation entry table when the page is closed. If you came this far and tested the solution then you will notice that if you close the item tracking lines page and open it again the information in the new field is gone. So, kind of useless so far, but hold on. 🙂
Storing it in the Reservation Entry Table
So to do this we open the code in the item tracking lines page and add the below lines (in this case I basically just searched for the expiration date and added my own lines of code under it since I know that my new field should work the same way);
First change is to add the below code to the RegisterChange function (this function runs when the page is closed):
As you can see this code calls a new function in the reservation entry table that we also need to add, it can look like below (as simple as possible);
If I then continue my search for the expiration date in the code of the item tracking lines page I will find some additional places where I need to add my new field, actually two more places in the same RegisterChange function;
Next thing to change is in the EntriesAreIdentical function, this function is used in the RegisterChange function that was modified previously and determines if there are reservation entries that are the same and should be updated.
The next place to add code to is in the ModifyFieldsWithinFilter function.
Last we have the function RegisterItemTrackingLines that needs to be modified according to below.
Again, like the rest of the places above where we have added code we are just following the footsteps of Microsoft by looking at the standard expiration date field and mimicking that code (therefor a lack of explanations to some of the changes).
If you test the functionality now you will notice the data in the vendor lot no. field is stored in the reservation entry table when you leave the item tracking lines page and it is retrieved again when you open the page.
Changing the Posting Routine
Now we have a place where we can enter the vendor lot no. and it gets stored in the reservation entry table. Next thing to do is to make sure this information is transferred to the item ledger entry during posting. As described earlier the code for posting inventory transactions first generates records in a temporary item journal line table and from there the item ledger entries are created. This all happens in codeunit 22 – Item Jnl.-Post Line, so lets open it in design mode and search for the expiration date (since we are lazy we don’t want to read the entire code, just search and do our additions).
When you search for expiration date in codeunit 22 you will notice that there is code to handle changes to the expiration dates, to check if expiration dates are present if mandatory and to calculate the expiration date during posting. Right now we can just find the places that populates the item journal line and then the item ledger entry table (I will get back to changing and making our new field mandatory later).
The first place to change is in the SetupTempSplitItemJnlLine function. This is the function that looks at the item tracking stored in the reservation entry table and creates a temporary record for each lot/serial number in the item journal line table. The code to add is as follows;
The other place is in the InitItemLedger function, this is what moves the data from the temporary item journal line table to the item ledger entry table.
Done! If you post a positive adjustment (or any other type of inbound item transaction) now you should see the vendor lot no. populated on the item ledger entries.
Assigning the value on Outbound Transactions
We have done the part that stores the vendor lot number in the reservation entry table and that adds it to the item ledger entry table during posting. What is left is to make sure it also default into the item tracking lines when an existing lot is selected for an outbound transaction.
There are two places where you need to add code for this, one is in the tracking specification table when the serial or lot number is entered and the other is in the page if it gets opened for something that already have a serial or lot number assigned to it.
For the table; we can do it the same way as Microsoft have done it for the expiration date, so we create a new function called InitVendorLotNo in the table that looks like below (basically a copy of the standard InitExpirationDate function).
This new function is then called on the OnValidate triggers of the serial and lot no. fields.
The ExistingVendorLotNo function in the Item Tracking Management codeunit that is referred to in the new function is kind of the same as the existing one for the expiration date (so I just copied the one called ExistingExpirationDate and changed it to below).
The above is when the serial or lot number is entered, if the item tracking lines pages is closed and then opened again you need to put some additional code to the page to retrieve the vendor lot no., this code is in the AddToGlobalRecordSet function and looks like below (as you can see it uses the same function as the OnValidate code in the table).
Now when we do a negative transaction in the item journal we can see that the vendor lot no. defaults from the lot we select. Nice!
An Alternative to the Item Ledger Entries
An alternative to storing the new field on item ledger entries is to use the tables called Lot No. Information (6505) and Serial No. Information (6504) to store the vendor lot no.
What you need to do in this case is to make sure those records are always created when inventory is added and then add the vendor lot no. field in that table instead of to the item ledger entries (all through codeunit 22). This is less programming and will be simpler if you want to change the vendor lot no. (you then just change it on the card of the lot or serial number), but it will not be transactional based and it will be slightly different compared to how Microsoft have done it with the other fields.
Changing an Existing Lot or Serial No.
Creating the code that allows you to change the Vendor Lot No. using the item reclassification journal (the same way as you can change the expiration date) is a topic by itself. If you have followed what I described above you have probably noticed that in a couple of places there are fields that starts with ‘New’ like New Expiration Date, New Lot No., etc… So to have a proper feature to update the vendor lot no. on an existing lot you will have to add the New Vendor Lot No. field to the same tables (except the item ledger entry table) and add lines of code to handle that part as well (again mimic the standard functionality around expiration dates).
I might do a future post describing this (like a part 2) and also how to make a new field like this mandatory when adding new lots to inventory.
This blog post turned our way more technical that what I initially had planned, but I guess that’s the nature of adding a field to the item tracking lines.
That’s all for this blog post, thanks for following and have a great day!
Remember to share this post as well! 🙂
Post Credit Goes to Olof Simren (Website : https://www.olofsimren.com/)
When you first look at it seems like a simple modification but it is actually a bit (or a lot) more involved than just adding the field to the table and the page.
The Item Tracking Page is in Dynamics NAV built using a temporary table called Tracking Specification, when the page is opened there is code that populate the table with data (if there is anything to display) and when the page is closed there is code that updates the data in a different table (if there is anything to update). That different table is the reservation entry table.
Don’t ask me why it was designed like this. 🙂 It’s been like that as far as I can remember and I have learned to live with it, but I am not sure if I am a big fan of it.
Then during posting the information in the reservation entry table is retrieved and is part of the posting routine. The posting routine populates a temporary Item Journal Line table with one record per lot or serial number and this then creates the Item Ledger Entry records.
The good part with this design is that the item tracking lines page is the same across the entire application, whether you are on a purchase order, a warehouse receipt, a sales order or in an item journal, etc. it is the same page that is opened.
In this example I will add a new field called Vendor Lot No. with the intention to enable capturing the vendor’s lot number against an internal lot number in Dynamics NAV (which is a common requirement).
Adding the New Field
I start with adding the field to the tables involved in this customization, I make it a code field and 50 characters long (to be on the safer side).
The tables where this field needs to be added are (you can copy/paste the field between the tables):
336 – Tracking Specification
337 – Reservation Entry
83 – Item Journal Line
32 – Item Ledger Entry
Next would be to add the field to the Item Tracking Line page (which is page 6510).
You will also need to add code to this page to control when the field is editable and to store the value in the reservation entry table.
The editable or not editable feature is because the same page is used for both inbound and outbound inventory transactions, and it is only for inbound transactions you want the field to be editable. And in the case of an inbound transaction it should only be editable if the lot number doesn’t already exists (e.g. when you add to an existing lot you don’t want a different vendor lot number). Since this is exactly how the expiration date works, I will simply piggyback on that functionality. I do this by simply setting the Editable property on the new vendor lot no. field to “Expiration DateEditable”.
If you want to use a different logic to define if the new field should be editable or not you will have to define a new global variable and write new code on the page to set it to true or false. This can be fairly easy or very complicated, but you have some examples to use if you search the code on the page (and there is a lot of code in the item tracking lines page).
To test this I can go to an item journal, add a positive adjustment for a tracked item and open the item tracking lines. We then see that the vendor lot no. is visible and can be edited if we add a lot number that does not already exist in the database but if we add to an existing lot is not editable. Then when we do a negative adjustment it is not edible. Perfect! 🙂
Next step is to make sure the data in the new field is stored in the reservation entry table when the page is closed. If you came this far and tested the solution then you will notice that if you close the item tracking lines page and open it again the information in the new field is gone. So, kind of useless so far, but hold on. 🙂
Storing it in the Reservation Entry Table
So to do this we open the code in the item tracking lines page and add the below lines (in this case I basically just searched for the expiration date and added my own lines of code under it since I know that my new field should work the same way);
First change is to add the below code to the RegisterChange function (this function runs when the page is closed):
As you can see this code calls a new function in the reservation entry table that we also need to add, it can look like below (as simple as possible);
If I then continue my search for the expiration date in the code of the item tracking lines page I will find some additional places where I need to add my new field, actually two more places in the same RegisterChange function;
Next thing to change is in the EntriesAreIdentical function, this function is used in the RegisterChange function that was modified previously and determines if there are reservation entries that are the same and should be updated.
The next place to add code to is in the ModifyFieldsWithinFilter function.
Last we have the function RegisterItemTrackingLines that needs to be modified according to below.
Again, like the rest of the places above where we have added code we are just following the footsteps of Microsoft by looking at the standard expiration date field and mimicking that code (therefor a lack of explanations to some of the changes).
If you test the functionality now you will notice the data in the vendor lot no. field is stored in the reservation entry table when you leave the item tracking lines page and it is retrieved again when you open the page.
Changing the Posting Routine
Now we have a place where we can enter the vendor lot no. and it gets stored in the reservation entry table. Next thing to do is to make sure this information is transferred to the item ledger entry during posting. As described earlier the code for posting inventory transactions first generates records in a temporary item journal line table and from there the item ledger entries are created. This all happens in codeunit 22 – Item Jnl.-Post Line, so lets open it in design mode and search for the expiration date (since we are lazy we don’t want to read the entire code, just search and do our additions).
When you search for expiration date in codeunit 22 you will notice that there is code to handle changes to the expiration dates, to check if expiration dates are present if mandatory and to calculate the expiration date during posting. Right now we can just find the places that populates the item journal line and then the item ledger entry table (I will get back to changing and making our new field mandatory later).
The first place to change is in the SetupTempSplitItemJnlLine function. This is the function that looks at the item tracking stored in the reservation entry table and creates a temporary record for each lot/serial number in the item journal line table. The code to add is as follows;
The other place is in the InitItemLedger function, this is what moves the data from the temporary item journal line table to the item ledger entry table.
Done! If you post a positive adjustment (or any other type of inbound item transaction) now you should see the vendor lot no. populated on the item ledger entries.
Assigning the value on Outbound Transactions
We have done the part that stores the vendor lot number in the reservation entry table and that adds it to the item ledger entry table during posting. What is left is to make sure it also default into the item tracking lines when an existing lot is selected for an outbound transaction.
There are two places where you need to add code for this, one is in the tracking specification table when the serial or lot number is entered and the other is in the page if it gets opened for something that already have a serial or lot number assigned to it.
For the table; we can do it the same way as Microsoft have done it for the expiration date, so we create a new function called InitVendorLotNo in the table that looks like below (basically a copy of the standard InitExpirationDate function).
This new function is then called on the OnValidate triggers of the serial and lot no. fields.
The ExistingVendorLotNo function in the Item Tracking Management codeunit that is referred to in the new function is kind of the same as the existing one for the expiration date (so I just copied the one called ExistingExpirationDate and changed it to below).
The above is when the serial or lot number is entered, if the item tracking lines pages is closed and then opened again you need to put some additional code to the page to retrieve the vendor lot no., this code is in the AddToGlobalRecordSet function and looks like below (as you can see it uses the same function as the OnValidate code in the table).
Now when we do a negative transaction in the item journal we can see that the vendor lot no. defaults from the lot we select. Nice!
An Alternative to the Item Ledger Entries
An alternative to storing the new field on item ledger entries is to use the tables called Lot No. Information (6505) and Serial No. Information (6504) to store the vendor lot no.
What you need to do in this case is to make sure those records are always created when inventory is added and then add the vendor lot no. field in that table instead of to the item ledger entries (all through codeunit 22). This is less programming and will be simpler if you want to change the vendor lot no. (you then just change it on the card of the lot or serial number), but it will not be transactional based and it will be slightly different compared to how Microsoft have done it with the other fields.
Changing an Existing Lot or Serial No.
Creating the code that allows you to change the Vendor Lot No. using the item reclassification journal (the same way as you can change the expiration date) is a topic by itself. If you have followed what I described above you have probably noticed that in a couple of places there are fields that starts with ‘New’ like New Expiration Date, New Lot No., etc… So to have a proper feature to update the vendor lot no. on an existing lot you will have to add the New Vendor Lot No. field to the same tables (except the item ledger entry table) and add lines of code to handle that part as well (again mimic the standard functionality around expiration dates).
I might do a future post describing this (like a part 2) and also how to make a new field like this mandatory when adding new lots to inventory.
This blog post turned our way more technical that what I initially had planned, but I guess that’s the nature of adding a field to the item tracking lines.
That’s all for this blog post, thanks for following and have a great day!
Remember to share this post as well! 🙂
Post Credit Goes to Olof Simren (Website : https://www.olofsimren.com/)
Number Series for Production Orders in Navision
In the demo company from Microsoft (also known as Cronus) the Manufacturing Setup has been configured to use different number series for the different production order statuses. Configuring it this way make Dynamics NAV to assign a new production order number each time the status is changed (except when it is changed to finished). I have never understood why you would setup the system this way, and I have never meet a customer that wants the system to behave this way either. But, I have seen it being implement this way several times. It may makes sense to use a different number series for simulated production orders, but not for firm planned vs. released production orders in my mind.
The preferred way to set this up is to use the same number series for all of the statuses, this way a firm planned production order will have the same order number when it is released (which in my mind is a lot less confusing).
This is how is should look like if you ask me, all the statuses has the same number series;
Note: you have a similar case for invoices and credit memos in the sales and purchase modules, You can setup the same number series for both unposted and posted invoices (and credit memos) in the sales & receivables and purchase & payables setup tables. This way the posted invoice (or credit memo) will have the same number as the unposted one.
The preferred way to set this up is to use the same number series for all of the statuses, this way a firm planned production order will have the same order number when it is released (which in my mind is a lot less confusing).
This is how is should look like if you ask me, all the statuses has the same number series;
Note: you have a similar case for invoices and credit memos in the sales and purchase modules, You can setup the same number series for both unposted and posted invoices (and credit memos) in the sales & receivables and purchase & payables setup tables. This way the posted invoice (or credit memo) will have the same number as the unposted one.
Debugger Break Rules – Break on Records Changes (Insert, Modify or Delete) in Navision
I was debugging something today and I noticed the ‘Break on Records Changes’ break rule, sweet… 🙂 I didn’t know this. In the older versions of Dynamics NAV I always used the code coverage to find where in the code records are modified, but this is much better.
Here is how to do it; start the debugger, click ‘Break Rules’, and activate the ‘Break on Records Changes’. The debugger will now stop whenever a record is inserted, modified or deleted.
Here is how to do it; start the debugger, click ‘Break Rules’, and activate the ‘Break on Records Changes’. The debugger will now stop whenever a record is inserted, modified or deleted.
Mandatory Dimensions by Account Type in Navision
Dimensions are great in Dynamics NAV and one of the things that makes it great is that you can control the required dimensions for each type of posting into the general ledger by setting dimensions as mandatory on the general ledger accounts. Most people that work with Dynamics NAV knows this. But surprisingly many people does not know that you can also specify what dimensions that are mandatory for each account type by using the ‘Account Type Default Dimension’ setup.
For each of your dimensions you can go to the ‘Account Type Default Dim’ and setup if the dimension is mandatory for all transactions with a certain type. As an example, the below setup defines that the ‘CUSTOMERGROUP’ dimension is mandatory for all Customers (table 18). This way you will not be able to post anything without this dimension against any of the customers independent on what is setup to be required on the general ledger accounts.
For each of your dimensions you can go to the ‘Account Type Default Dim’ and setup if the dimension is mandatory for all transactions with a certain type. As an example, the below setup defines that the ‘CUSTOMERGROUP’ dimension is mandatory for all Customers (table 18). This way you will not be able to post anything without this dimension against any of the customers independent on what is setup to be required on the general ledger accounts.
Run Dynamics Navision as Different User (NAV Login with multiple users on a single Machine)
A question that I receive frequently is; ‘how do I run Dynamics NAV as a different user?’. A basic question it seems, but not everybody is aware of how it can be done.
It could for example be that you are testing permissions and you want to run one client with SUPER user access to do the permission setup and another client with limited access to test the setup at the same time. Another common scenario is that you want to debug something on a users computer and for this you need your own log-in to have full permission and access to the debugger.
Luckily it is quite easy to run Dynamics NAV as a different user without logging out of windows, here is how to do it:
Right click on the Dynamics NAV icon and select Run as Different User.
Note :- If the option does not show up when you right click, try to hold down the SHIFT key while right clicking.
Then you simply sign in with the different user through the dialog that appears and that’s it!
Now you can run two or more NAV clients on the same computer logged in as two or more different users.
Nice, easy and very useful! 🙂
It could for example be that you are testing permissions and you want to run one client with SUPER user access to do the permission setup and another client with limited access to test the setup at the same time. Another common scenario is that you want to debug something on a users computer and for this you need your own log-in to have full permission and access to the debugger.
Luckily it is quite easy to run Dynamics NAV as a different user without logging out of windows, here is how to do it:
Right click on the Dynamics NAV icon and select Run as Different User.
Note :- If the option does not show up when you right click, try to hold down the SHIFT key while right clicking.
Then you simply sign in with the different user through the dialog that appears and that’s it!
Now you can run two or more NAV clients on the same computer logged in as two or more different users.
Nice, easy and very useful! 🙂
How to Calculate the Current Fiscal Year in Navision C/AL
In Navision, there’s no function that will give you the fiscal year according to what you’ve setup on the Accounting Period table. Here’s a code that will get the current fiscal year based on the accounting period:
AccountingPeriod is a record variable to table 50
Date1 and Date2 are date variables
AccountingPeriod.RESET;
AccountingPeriod.SETRANGE(“New Fiscal Year”,TRUE);
AccountingPeriod.”Starting Date” := WORKDATE;
AccountingPeriod.FIND(‘=<‘);
Date1 := AccountingPeriod.”Starting Date”;
IF AccountingPeriod.NEXT = 0 THEN
Date2 := 12319999D
ELSE
Date2 := AccountingPeriod.”Starting Date” – 1;
AccountingPeriod is a record variable to table 50
Date1 and Date2 are date variables
AccountingPeriod.RESET;
AccountingPeriod.SETRANGE(“New Fiscal Year”,TRUE);
AccountingPeriod.”Starting Date” := WORKDATE;
AccountingPeriod.FIND(‘=<‘);
Date1 := AccountingPeriod.”Starting Date”;
IF AccountingPeriod.NEXT = 0 THEN
Date2 := 12319999D
ELSE
Date2 := AccountingPeriod.”Starting Date” – 1;
Sort on Multiple Columns in Dynamics NAV
This is something I first discovered some months ago, and back then I didn’t think that much about it. Recently someone asked me if it was possible, and I thought it would be worth a quick small blog post.
Yes, you can sort on multiple columns in Microsoft Dynamics NAV (with some limitations though). You do it by holding the shift key down while clicking the next column(s). This way Dynamics NAV sorts the data based on multiple columns.
On the page you can see it by the sorting indicator (or whatever the small triangle is called) is being displayed on multiple columns.
The only odd thing is that it does not seem to work to decide if the sorting is going to be descending or ascending on the individual columns, they are either all descending or all ascending. Well, you can’t get everything. 🙂
Yes, you can sort on multiple columns in Microsoft Dynamics NAV (with some limitations though). You do it by holding the shift key down while clicking the next column(s). This way Dynamics NAV sorts the data based on multiple columns.
On the page you can see it by the sorting indicator (or whatever the small triangle is called) is being displayed on multiple columns.
The only odd thing is that it does not seem to work to decide if the sorting is going to be descending or ascending on the individual columns, they are either all descending or all ascending. Well, you can’t get everything. 🙂
Restarting Job Queue automatically when it Hits an Error on Dynamics Navision
Job Queue
In Dynamics Navision, you can setup job queue to automate processing of tasks. Popular tasks that are automated are things such as Adjust Cost – Validating Entries, Batch Job processing, Reporting, etc.
Setting up job queue in Navision couldn’t be much easier. BUT..
The Problem
When the job queue runs into an error, it will never get picked up again. This means that while the Job Queue is an automated process, the IT manager will need to monitor this every day to make sure every process is running.
I know what you’re thinking, “This does not make sense!”. I fully agree.
There are some processes where the error is fatal. This is the reason why you would not want to have it run again. However, there are some situations where the error occurs when the table is locked by another process, in this case, you absolutely need to have it restart again.
This is especially true when you process EDI orders. You have to send back acknowledgment and/or confirmation within a certain timeframe or else you’ll get charge backs. Having the job queue error out because of table locks does not make too much sense.
The Solution
The problem lies in the Job Queue Dispatcher codeunit (448). If you go down and find the local function GetNextRequest, you’ll see that for some odd reason, the process is only looking at any statuses that are Ready.
So we will need to modify the code to scan for the error entries as well.
Depending on what you use the Job Queue for, I would include job queues that are In Process. The reason is if it’s running and someone stops the job queue, it’ll stay stuck in the In Process status.
By setting this, it’s important that you set the Max No. of Attempts. You don’t want the job queue to keep running if there really is a critical error.
In Dynamics Navision, you can setup job queue to automate processing of tasks. Popular tasks that are automated are things such as Adjust Cost – Validating Entries, Batch Job processing, Reporting, etc.
Setting up job queue in Navision couldn’t be much easier. BUT..
The Problem
When the job queue runs into an error, it will never get picked up again. This means that while the Job Queue is an automated process, the IT manager will need to monitor this every day to make sure every process is running.
I know what you’re thinking, “This does not make sense!”. I fully agree.
There are some processes where the error is fatal. This is the reason why you would not want to have it run again. However, there are some situations where the error occurs when the table is locked by another process, in this case, you absolutely need to have it restart again.
This is especially true when you process EDI orders. You have to send back acknowledgment and/or confirmation within a certain timeframe or else you’ll get charge backs. Having the job queue error out because of table locks does not make too much sense.
The Solution
The problem lies in the Job Queue Dispatcher codeunit (448). If you go down and find the local function GetNextRequest, you’ll see that for some odd reason, the process is only looking at any statuses that are Ready.
So we will need to modify the code to scan for the error entries as well.
Depending on what you use the Job Queue for, I would include job queues that are In Process. The reason is if it’s running and someone stops the job queue, it’ll stay stuck in the In Process status.
By setting this, it’s important that you set the Max No. of Attempts. You don’t want the job queue to keep running if there really is a critical error.
Subscribe to:
Posts (Atom)
-
How to Resolve OLE or Automation Error How many times do you g ot an error when we are trying to do a Data Migration here's the mes...
-
Recently, I need to import some flat text files into NAV into completely new tables. So first, I created a table containing all the fields ...
-
The concepts described in this post are applicable to different versions/builds, for examples I will use an installation of Microsoft Dyna...