Installation information
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.Note Before you install this hotfix, verify that all Microsoft Navision client users are logged off the system. This includes Microsoft Navision Application Services (NAS) client users. You should be the only client user who is logged on when you implement this hotfix.To implement this hotfix, you must have a developer license.
We recommend that the user account in the Windows Logins window or in the Database Logins window be assigned the "SUPER" role ID. If the user account cannot be assigned the "SUPER" role ID, you must verify that the user account has the following permissions: - The Modify permission for the object that you will be changing.
- The Execute permission for the System Object ID 5210 object and for the System Object ID 9015 object.
Note You do not have to have rights to the data stores unless you have to perform data repair.
Code changes
Note Always test code fixes in a controlled environment before you apply the fixes to your production computers. To resolve this problem, change the code in the
FindTopLevel function codeunit (99000853) as follows:
Add two local variables as follows:
- Name: ProdBOMHeader2; DataType: Record; Subtype: 99000771
- Name: CountofRecords; DataType: Integer
Existing code 1...
ProdBOMLine.SETCURRENTKEY(Type,"No.");
// Delete the following line.
IF Item.FINDSET THEN
// End of the deleted the line.
REPEAT
Window.UPDATE(2,Item."No.");
// Delete the following line.
Window.UPDATE(3,ROUND(NoofItems / Item.COUNT * 10000,1));
// End of the deleted the line.
ProdBOMLine.SETRANGE("No.",Item."No.");
...
Replacement code 1...
ProdBOMLine.SETCURRENTKEY(Type,"No.");
// Add the following lines.
CountOfRecords := Item.COUNT;
IF Item.FIND('-') THEN
// End of the added lines.
REPEAT
Window.UPDATE(2,Item."No.");
// Add the following line.
Window.UPDATE(3,ROUND(NoofItems / CountOfRecords * 10000,1));
// End of the added line.
ProdBOMLine.SETRANGE("No.",Item."No.");
...
Existing code 2...
IF ProdBOMHeader.GET(ProdBOMLine."Production BOM No.") THEN
// Delete the following line.
IF ProdBOMHeader.Status <> ProdBOMHeader.Status::Certified THEN
// End of the deleted the line.
IF ProdBOMHeader.GET(Item."Production BOM No.") THEN
CalcLevelsForBOM(ProdBOMHeader);
...
Replacement code 2...
IF ProdBOMHeader.GET(ProdBOMLine."Production BOM No.") THEN
// Add the following line.
IF ProdBOMHeader.Status IN [ProdBOMHeader.Status::New,ProdBOMHeader.Status::"Under Development"] THEN
// End of the added line.
IF ProdBOMHeader.GET(Item."Production BOM No.") THEN
CalcLevelsForBOM(ProdBOMHeader);
...
Existing code 3...
ProdBOMHeader.RESET;
ProdBOMHeader.SETRANGE("Low-Level Code",0);
IF ProdBOMHeader.FINDSET(TRUE) THEN
REPEAT
Window.UPDATE(2,ProdBOMHeader."No.");
Window.UPDATE(3,ROUND(NoofItems / ProdBOMHeader.COUNT * 10000,1));
CalcLevelsForBOM(ProdBOMHeader);
NoofItems := NoofItems + 1;
...
Replacement code 3...
ProdBOMHeader.RESET;
ProdBOMHeader.SETCURRENTKEY(Status);
ProdBOMHeader.SETRANGE(Status,ProdBOMHeader.Status::Certified);
ProdBOMHeader.SETRANGE("Low-Level Code",0);
CountOfRecords := ProdBOMHeader.COUNT;
IF ProdBOMHeader.FIND('-') THEN
REPEAT
Window.UPDATE(2,ProdBOMHeader."No.");
Window.UPDATE(3,ROUND(NoofItems / CountOfRecords * 10000,1));
ProdBOMHeader2 := ProdBOMHeader;
CalcLevelsForBOM(ProdBOMHeader2);
NoofItems := NoofItems + 1;
...
Prerequisites
You must have Microsoft Dynamics NAV 2009 Service Pack 1 (SP1) or Microsoft Dynamics NAV 2009 R2 installed to apply this hotfix.
Removal information
You cannot remove this hotfix.