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.
Apply the following code to enable the missing functionality. In the Classic client, if you run the Change Batch feature on a batch without an existing deposit, the Deposit form will create a blank record. However, if you run the Change Batch feature in the RTC, you will be taken back to the Deposit List page in which you can create a new deposit.
Code changes
Note Always test code fixes in a controlled environment before you apply the fixes to your production computers. To resolve this problem, follow these steps:
- Change the code in the LookupName function in the GenJnlManagement codeunit (230) as follows:
Existing code...
PROCEDURE LookupName@6(VAR CurrentJnlBatchName@1000 : Code[10];VAR GenJnlLine@1001 : Record 81);
VAR
GenJnlBatch@1002 : Record 232;
BEGIN
COMMIT;
GenJnlBatch."Journal Template Name" := GenJnlLine.GETRANGEMAX("Journal Template Name");
GenJnlBatch.Name := GenJnlLine.GETRANGEMAX("Journal Batch Name");
GenJnlBatch.FILTERGROUP(2);
GenJnlBatch.SETRANGE("Journal Template Name",GenJnlBatch."Journal Template Name");
GenJnlBatch.FILTERGROUP(0);
IF FORM.RUNMODAL(0,GenJnlBatch) = ACTION::LookupOK THEN BEGIN
CurrentJnlBatchName := GenJnlBatch.Name;
SetName(CurrentJnlBatchName,GenJnlLine);
END;
END;
...
Replacement code...
PROCEDURE LookupName@6(VAR CurrentJnlBatchName@1000 : Code[10];VAR GenJnlLine@1001 : Record 81);
VAR
GenJnlBatch@1002 : Record 232;
BEGIN
COMMIT;
GenJnlBatch."Journal Template Name" := GenJnlLine.GETRANGEMAX("Journal Template Name");
GenJnlBatch.Name := GenJnlLine.GETRANGEMAX("Journal Batch Name");
GenJnlBatch.FILTERGROUP(2);
GenJnlBatch.SETRANGE("Journal Template Name",GenJnlBatch."Journal Template Name");
GenJnlBatch.FILTERGROUP(0);
// Add the following line.
IF NOT ISSERVICETIER THEN BEGIN
// End of the line.
IF FORM.RUNMODAL(0,GenJnlBatch) = ACTION::LookupOK THEN BEGIN
CurrentJnlBatchName := GenJnlBatch.Name;
SetName(CurrentJnlBatchName,GenJnlLine);
// Add the following lines.
END
END ELSE BEGIN
IF PAGE.RUNMODAL(0,GenJnlBatch) = ACTION::LookupOK THEN BEGIN
CurrentJnlBatchName := GenJnlBatch.Name;
SetName(CurrentJnlBatchName,GenJnlLine);
END;
END;
// End of tje lines.
END;
...
- Change the code in the Deposit form (10140) as follows:
Existing code...
{ ID=1020017;
Ellipsis=Yes;
CaptionML=ENU=Change &Batch;
OnPush=BEGIN
// Delete the following lines.
IF NOT ISSERVICETIER THEN BEGIN // NA0002
// NA0001.begin
// End of the lines.
CurrForm.SAVERECORD;
GenJnlManagement.LookupName(CurrentJnlBatchName,GenJnlLine);
IF "Journal Batch Name" <> CurrentJnlBatchName THEN BEGIN
CLEAR(Rec);
SyncFormWithJournal;
END;
// Delete the following lines.
// NA0001.end
END; // NA0002
// End of the lines.
END;
}
...
Replacement code...
{ ID=1020017;
Ellipsis=Yes;
CaptionML=ENU=Change &Batch;
OnPush=BEGIN
CurrForm.SAVERECORD;
GenJnlManagement.LookupName(CurrentJnlBatchName,GenJnlLine);
IF "Journal Batch Name" <> CurrentJnlBatchName THEN BEGIN
CLEAR(Rec);
SyncFormWithJournal;
END;
END;
}
...
- Change the code in the Deposit page (10140) as follows:
Existing code...
{ 1020031 ;2 ;Action ;
CaptionML=[ENU=Dimensions;
ESM=Dimensiones;
FRC=Dimensions;
ENC=Dimensions];
RunObject=Page 546;
RunFormView=WHERE(Table ID=CONST(10140),
Document Type=CONST(Quote),
Line No.=CONST(0));
RunFormLink=Document No.=FIELD(No.);
Image=Dimensions }
{ 1020018 ;2 ;Separator }
{ 1900000006;0 ;ActionContainer;
ActionContainerType=Reports }
...
Replacement code...
{ 1020031 ;2 ;Action ;
CaptionML=[ENU=Dimensions;
ESM=Dimensiones;
FRC=Dimensions;
ENC=Dimensions];
RunObject=Page 546;
RunFormView=WHERE(Table ID=CONST(10140),
Document Type=CONST(Quote),
Line No.=CONST(0));
RunFormLink=Document No.=FIELD(No.);
Image=Dimensions }
{ 1020018 ;2 ;Separator }
// Add the following lines.
{ 1000000000;2 ;Action ;
Name=<Action1020032>;
CaptionML=ENU=Change Batch;
OnAction=BEGIN
CurrPage.SAVERECORD;
GenJnlManagement.LookupName(CurrentJnlBatchName,GenJnlLine);
IF "Journal Batch Name" <> CurrentJnlBatchName THEN BEGIN
CLEAR(Rec);
SyncFormWithJournal;
END;
END;
}
// End of the lines.
{ 1900000006;0 ;ActionContainer;
ActionContainerType=Reports }
...
Prerequisites
You must have one of the following products installed to apply this hotfix:
- The North American version of Microsoft Dynamics NAV 2009 R2
- The North American version of Microsoft Dynamics NAV 2009 Service Pack 1
- The North American version of Microsoft Dynamics NAV 2009
Removal information
You cannot remove this hotfix.