本文適用於 Microsoft 動態航行點的所有國家/地區和所有的語言地區設定。
狀況
假設您有一個以上的項目追蹤空白行,可以讓 Microsoft 動態航行點 2009年中的項目工作日誌。當您在工作筆記本,到紙匣中張貼項目時,倉儲項目只會更新追蹤行輸入最後一個項目。因此,沒有與倉庫及項目總帳之間的項目為負載失衡的影響。
下列產品中,就會發生這個問題︰
-
Microsoft 動態航行點 2009 R2
-
Microsoft 動態航行點 2009 Service Pack 1 (SP1)
解決方案
Hotfix 資訊
已經可以從 Microsoft 取得支援的 hotfix。不過,它只被用來修正本文所述的問題。它只適用於發生此特定問題的系統上。此 hotfix 可能會接受其他測試。因此,如果此問題不會嚴重影響,我們建議您等候下一步的 Microsoft 動態航行點 service pack 或包含此 hotfix 的下一個 Microsoft 動態航行點版本。
注意 在特殊的情況下,通常會支援呼叫可能已被取消如果技術支援專業人員的 Microsoft 動態及相關的產品所產生的費用會決定某特定更新程式可以解決您的問題。收取支援費用會套用,如果有其他支援問題是,不能限定的特定更新程式。
安裝資訊
Microsoft 會提供程式設計範例僅供說明,而不做任何明示或默示的保證。這包括,但不限於適售性或適合某特定用途之默示擔保責任。本文假設您已相當熟悉使用的我們所示範的程式設計語言以及建立和偵錯程序所使用的工具。Microsoft 技術支援工程師可以協助解釋特定程序中,功能,但它們不會修改這些範例以提供附加功能或建構程序來滿足您特定需求。
注意套用此 hotfix 之前,請確認所有的 Microsoft Navision 用戶端使用者會登出系統。這包括 Microsoft Navision 應用程式服務 (NAS) 用戶端的使用者。您應該是唯一的用戶端使用者已登入,當您實作此 hotfix。
若要實作此 hotfix,您必須有開發人員授權。
我們建議您在 Windows 登入] 視窗中的色彩,或資料庫登入] 視窗中的使用者帳戶被指派 「 進階 」 的角色識別碼。如果使用者帳戶不能指派為 「 超級 」 的角色識別碼,您必須確認使用者帳戶具有下列權限︰
-
您將會變更物件的 [修改] 權限。
-
執行權限的系統物件 ID 5210物件和系統物件 ID 9015物件。
注意您沒有擁有資料存放區的權限,除非您需要執行資料修復。
程式碼變更
注意永遠測試程式碼修正在受控制的環境中才能套用到實際執行電腦的修正程式。
若要解決這個問題,請遵循下列步驟︰ 建立下列的本機變數︰
-
工作日誌列表 (210),新增新的全域變數,然後指定變數,如下所示︰
-
名稱︰ WMSManagement
-
資料型別︰ Codeunit
-
子類型︰ WMS 管理(7302)
-
-
下列程式碼中筒的程式碼中的 [ TableRelation ] 屬性欄位 (5403) 工作日誌列表 (210) 中的刪除︰
Bin.Code WHERE (Location Code=FIELD(Location Code));
-
紙匣的程式碼的OnValidate觸發程序中的程式碼在依照工作日誌列資料表 (210) 中欄位 (5403) 的變更︰
現有的程式碼...// Delete the following lines.
TESTFIELD("Location Code");
CheckItemAvailable;
// End of the lines.
...取代程式碼
...// Add the following lines.
TESTFIELD("Location Code");
IF "Bin Code" <> '' THEN BEGIN
GetLocation("Location Code");
Location.TESTFIELD("Bin Mandatory");
END;
TESTFIELD(Type,Type::Item);
CheckItemAvailable;
WMSManagement.FindBinContent("Location Code","Bin Code","No.","Variant Code",'')
// End of the lines.
... -
紙匣的程式碼- OnLookup triggerin 工作日誌列表 (210),在新增新的本機變數,然後指定變數,如下所示︰
-
名稱︰ BinCode
-
資料型別︰的程式碼
-
長度︰ 20
-
-
紙匣的程式碼- OnLookup觸發程序工作日誌列表 (210) 中加入下列程式碼︰
TESTFIELD("Location Code");TESTFIELD(Type,Type::Item);
BinCode := WMSManagement.BinContentLookUp("Location Code","No.","Variant Code",'',"Bin Code");
IF BinCode <> '' THEN
VALIDATE("Bin Code",BinCode); -
來源文件中的欄位 (25) 倉儲筆記本行資料表 (7311) 的 [ OptionString ] 屬性中的值變更如下︰
OptionString=,s 順序,s 發票、 S 信用備忘、 S 傳回順序、 採購訂單、 採購發票、 採購的信用備忘、 P 傳回順序,Inb。傳輸,Outb。傳輸,Prod。消耗量,項目 Jnl,實際完成的 Invt。Jnl。,Reclass。Jnl。,消耗 Jnl。,順序輸出 Jnl。,BOM Jnl。,Serv,工作 Jnl。 -
變更下列參考文件中的欄位 (60) 倉儲筆記本行資料表 (7311) 的 [ OptionString ] 屬性中的值︰
OptionString= 、 Rcpt.,張貼採購發票的張貼、 張貼張貼 P Cr.備忘,張貼張貼 s 發票,張貼 Rtrn。 出貨,張貼 S Cr.備忘,張貼 t 回條,張貼 t 運送貨品 Rtrn。 Rcpt.,項目日誌,Prod.,Put-離開,挑選,移動、 BOM 日誌、 工作日誌 -
來源文件中的欄位 (25) (7312) 中的 [倉儲的資料編輯] 表格中的 [ OptionString ] 屬性中的值變更如下︰
OptionString=,s 順序,s 發票、 S 信用備忘、 S 傳回順序、 採購訂單、 採購發票、 採購的信用備忘、 P 傳回順序,Inb。傳輸,Outb。傳輸,Prod。消耗量,項目 Jnl,實際完成的 Invt。Jnl。,Reclass。Jnl。,消耗 Jnl。,順序輸出 Jnl。,BOM Jnl。,Serv.,工作 Jnl。 -
變更下列參考文件中的欄位 (60) (7312) 中的 [倉儲的資料編輯] 表格中的 [ OptionString ] 屬性中的值︰
OptionString= 、 Rcpt.,張貼採購發票的張貼、 張貼張貼 P Cr.備忘,張貼張貼 s 發票,張貼 Rtrn。 出貨,張貼 S Cr.備忘,張貼 t 回條,張貼 t 運送貨品 Rtrn。 Rcpt.,項目日誌,Prod.,Put-離開,挑選,移動、 BOM 日誌、 工作日誌 -
變更位置的程式碼中的控制項 (60) 工作日誌表單 (201) 的看得見] 屬性如下所示︰
現有的程式碼Visible = Yes
取代程式碼
Visible = No
-
工作日誌形式 (201),新增區域代碼欄位與 [工作類型的代碼] 欄位的 [紙匣代碼] 欄位,然後指定的欄位,請依照下列︰
...{ 61 ;Label ;0 ;0 ;0 ;0 ;ParentControl=60;
InColumnHeading=Yes }
// Add the following lines.
{ 102 ;TextBox ;35507;1650 ;1700 ;440 ;ParentControl=1;
InColumn=Yes;
SourceExpr="Bin Code" }
{ 103 ;Label ;0 ;0 ;0 ;0 ;ParentControl=102;
InColumnHeading=Yes }
// End of the lines.
{ 48 ;TextBox ;11430;2530 ;1650 ;440 ;ParentControl=1;
... -
工作 Jnl.新增新的全域變數-張貼行 codeunit (1012),然後指定變數,如下所示︰
-
名稱︰位置
-
資料型別︰資料錄
-
子類型︰位置(14)
-
-
建立新的GetLocation函式工作 Jnl.-後置行 codeunit (1012),如下所示︰
LOCAL PROCEDURE GetLocation@25(LocationCode@1000 : Code[10]);
-
在 [工作 Jnl GetLocation函式中加入下列程式碼-張貼行 codeunit (1012):
IF LocationCode = '' THENCLEAR(Location)
ELSE
IF Location.Code <> LocationCode THEN
Location.GET(LocationCode); -
建立新的PostWhseJnlLine函式工作 Jnl.-後置行 codeunit (1012),如下所示︰
LOCAL PROCEDURE PostWhseJnlLine@24(ItemJnlLine@1000 : Record 83;OriginalQuantity@1001 : Decimal;OriginalQuantityBase@1002 : Decimal;VAR TempTrackingSpecification@1003 : TEMPORARY Record 336);
-
在 [工作 Jnl PostWhseJnlLine函式中建立下列的本機變數-張貼行 codeunit (1012):
-
加入工作 Jnl. PostWhseJnlLine函式中的區域變數-張貼行 codeunit (1012),然後指定變數,如下所示︰
-
名稱︰ WarehouseJournalLine
-
資料型別︰資料錄
-
子類型︰倉儲筆記本行(7311)
-
-
加入工作 Jnl. PostWhseJnlLine函式中的區域變數-張貼行 codeunit (1012),然後指定變數,如下所示︰
-
名稱︰ TempWarehouseJournalLine
-
資料型別︰暫時的記錄
-
子類型︰倉儲筆記本行(7311)
-
-
加入工作 Jnl. PostWhseJnlLine函式中的區域變數-張貼行 codeunit (1012),然後指定變數,如下所示︰
-
名稱︰ ItemTrackingManagement
-
資料型別︰ Codeunit
-
子類型︰項目追蹤管理(6500)
-
-
加入工作 Jnl. PostWhseJnlLine函式中的區域變數-張貼行 codeunit (1012),然後指定變數,如下所示︰
-
名稱︰ WMSManagement
-
資料型別︰ Codeunit
-
子類型︰ WMS 管理(7302)
-
-
加入工作 Jnl. PostWhseJnlLine函式中的區域變數-張貼行 codeunit (1012),然後指定變數,如下所示︰
-
名稱︰ WhseJnlRegisterLine
-
資料型別︰ Codeunit
-
子類型︰ Whse。Jnl。-註冊行(7301)
-
-
-
在 [工作 Jnl PostWhseJnlLine函式中加入下列程式碼-張貼行 codeunit (1012),如下所示︰
WITH ItemJnlLine DO BEGINIF "Entry Type" IN ["Entry Type"::Consumption,"Entry Type"::Output] THEN
EXIT;
Quantity := OriginalQuantity;
"Quantity (Base)" := OriginalQuantityBase;
GetLocation("Location Code");
IF Location."Bin Mandatory" THEN
IF WMSManagement.CreateWhseJnlLine(ItemJnlLine,0,WarehouseJournalLine,FALSE,FALSE) THEN BEGIN
TempTrackingSpecification.MODIFYALL("Source Type",DATABASE::"Job Journal Line");
ItemTrackingManagement.SplitWhseJnlLine(WarehouseJournalLine,TempWarehouseJournalLine,TempTrackingSpecification,FALSE);
IF TempWarehouseJournalLine.FIND('-') THEN
REPEAT
WMSManagement.CheckWhseJnlLine(TempWarehouseJournalLine,1,0,FALSE);
WhseJnlRegisterLine.RUN(TempWarehouseJournalLine);
UNTIL TempWarehouseJournalLine.NEXT = 0;
END;
END; -
工作 Jnl.程式碼函式中加入新的本機變數-張貼行 codeunit (1012),然後指定變數,如下所示︰
-
名稱︰ TempTrackingSpecification
-
資料型別︰暫時的記錄
-
子類型︰追蹤規格(336)
-
-
工作 Jnl.程式碼函式中加入新的本機變數-張貼行 codeunit (1012),然後指定變數,如下所示︰
-
名稱︰ ItemJnlLine2
-
資料型別︰資料錄
-
子類型︰項目筆記本行(83)
-
-
變更程式碼函式,在 [工作 Jnl 中的程式碼-下列的後置行 codeunit (1012):
現有的程式碼 1...ItemJnlLine.INIT;
ItemJnlLine."Item No." := JobJnlLine2."No.";
...取代程式碼 1
...ItemJnlLine.INIT;
// Add the following line.
ItemJnlLine."Line No." := "Line No.";
ItemJnlLine."Item No." := JobJnlLine2."No.";
...現有的程式碼 2
...ItemLedgEntry.LOCKTABLE;
ItemJnlPostLine.RunWithCheck(ItemJnlLine,TempJnlLineDim);
END;
...取代程式碼 2
...ItemLedgEntry.LOCKTABLE;
// Add the following line.
ItemJnlLine2 := ItemJnlLine;
ItemJnlPostLine.RunWithCheck(ItemJnlLine,TempJnlLineDim);
// Add the following lines.
ItemJnlPostLine.CollectTrackingSpecification(TempTrackingSpecification);
PostWhseJnlLine(ItemJnlLine2,ItemJnlLine2.Quantity,ItemJnlLine2."Quantity (Base)",TempTrackingSpecification);
// End of the lines.
... -
變更 [ OptionString ] 屬性的參考文件中的參數在 Whse 的GetSourceDocument函式中的值。下列管理 codeunit (5775):
OptionString=,s 順序,s 發票、 S 信用備忘、 S 傳回順序、 採購訂單、 採購發票、 採購的信用備忘、 P 傳回順序,Inb。傳輸,Outb。傳輸,Prod。消耗量,項目 Jnl,實際完成的 Invt。Jnl。,Reclass。Jnl。,消耗 Jnl。,順序輸出 Jnl。,BOM Jnl。,Serv.,工作 Jnl。 -
變更 Whse 的GetSourceDocument函式中的程式碼。以下為管理 codeunit (5775):
現有的程式碼...EXIT;
END;
END;
ERROR(Text000);
...取代程式碼
...EXIT;
END;
// Add the following lines.
DATABASE::"Job Journal Line":
BEGIN
SourceDocument := SourceDocument::"Job Jnl.";
EXIT;
END;
// End of the lines.
END;
ERROR(Text000);
... -
請依照下列隨著 WMS 管理 codeunit (7302) 的CreateWhseJnlLine函式中的程式碼︰
現有的程式碼...WhseJnlLine."Source Line No." := "Line No.";
END;
WhseJnlLine."Source Code" := "Source Code";
WhseJnlLine."Reason Code" := "Reason Code";
WhseJnlLine."Registering No. Series" := "Posting No. Series";
WhseJnlLine."Whse. Document Type" := WhseJnlLine."Whse. Document Type"::" ";
// Delete the following line.
WhseJnlLine."Reference Document" := WhseJnlLine."Reference Document"::"Item Journal";
WhseJnlLine."Reference No." := "Document No.";
...取代程式碼
...WhseJnlLine."Source Line No." := "Line No.";
// Add the following lines.
END ELSE
IF "Job No." <> '' THEN BEGIN
WhseJnlLine."Source Type" := DATABASE::"Job Journal Line";
WhseJnlLine."Source Subtype" := ItemJnlTemplateType;
WhseMgt.GetSourceDocument(WhseJnlLine."Source Document",WhseJnlLine."Source Type",WhseJnlLine."Source Subtype");
WhseJnlLine."Source No." := "Document No.";
WhseJnlLine."Source Line No." := "Line No.";
// End of the lines.
END;WhseJnlLine."Source Code" := "Source Code";
WhseJnlLine."Reason Code" := "Reason Code";
WhseJnlLine."Registering No. Series" := "Posting No. Series";
WhseJnlLine."Whse. Document Type" := WhseJnlLine."Whse. Document Type"::" ";
// Add the following lines.
IF "Job No." = '' THEN
WhseJnlLine."Reference Document" := WhseJnlLine."Reference Document"::"Item Journal"
ELSE
WhseJnlLine."Reference Document" := WhseJnlLine."Reference Document"::"Job Journal";
// End of the lines.
WhseJnlLine."Reference No." := "Document No.";
...ine."Source Code" := "Source Code";
WhseJnlLine."Reason Code" := "Reason Code";
WhseJnlLine."Registering No. Series" := "Posting No. Series";
WhseJnlLine."Whse. Document Type" := WhseJnlLine."Whse. Document Type"::" ";
// Add the following lines.
IF "Job No." = '' THEN
WhseJnlLine."Reference Document" := WhseJnlLine."Reference Document"::"Item Journal"
ELSE
WhseJnlLine."Reference Document" := WhseJnlLine."Reference Document"::"Job Journal";
// End of the lines.
WhseJnlLine."Reference No." := "Document No.";
...
先決條件
您必須具備套用此 hotfix 之後安裝下列產品的其中一個︰
-
Microsoft 動態航行點 2009 R2
-
Microsoft 動態航行點 2009 Service Pack 1 (SP1)
移除資訊
您無法移除此 hotfix。
狀態
Microsoft 已確認這是<套用>一節所列出的 Microsoft 產品的問題。
注意這是直接從 Microsoft 支援組織內建立的「快速發行」文件。本文件所包含的現狀資訊是針對新興問題的回應。為縮短使其可用的時程,資料可能會包含印刷錯誤,且可能會隨時進行修改而不另行通知。如其他考量,請參閱 「使用規定」。