บทความนี้ใช้กับ Microsoft Dynamics NAV สําหรับภาษาท้องถิ่นทั้งหมด
อาการ
ใน Microsoft Dynamics NAV เมื่อคุณตั้งค่าฟิลด์ หมายเลข รายงานจะแสดงสินค้าที่ไม่สมบูรณ์
ปัญหานี้เกิดขึ้นในผลิตภัณฑ์ต่อไปนี้:
- Microsoft Dynamics NAV 2009 Service Pack 1 (SP1)
- Microsoft Dynamics NAV 2009 R2
การแก้ปัญหา
ข้อมูลโปรแกรมแก้ไขด่วน
โปรแกรมแก้ไขด่วนที่ได้รับการสนับสนุนจาก Microsoft พร้อมใช้งานแล้ว อย่างไรก็ตาม มีไว้เพื่อแก้ไขปัญหาที่อธิบายไว้ในบทความนี้เท่านั้น นําไปใช้กับระบบที่พบปัญหานี้โดยเฉพาะเท่านั้น โปรแกรมแก้ไขด่วนนี้อาจได้รับการทดสอบเพิ่มเติม ดังนั้น ถ้าคุณไม่ได้รับผลกระทบอย่างร้ายแรงจากปัญหานี้ เราขอแนะนําให้คุณรอ Service Pack 2009 สําหรับ Microsoft Dynamics NAV 2009 ถัดไป หรือ Microsoft Dynamics NAV เวอร์ชันถัดไปที่ประกอบด้วยโปรแกรมแก้ไขด่วนนี้
หมายเหตุ ในกรณีพิเศษ ค่าธรรมเนียมสําหรับการโทรติดต่อฝ่ายสนับสนุนตามปกติอาจถูกยกเลิกถ้าผู้เชี่ยวชาญฝ่ายสนับสนุนทางเทคนิคสําหรับ Microsoft Dynamics และผลิตภัณฑ์ที่เกี่ยวข้องระบุว่าการอัปเดตเฉพาะจะแก้ไขปัญหาของคุณได้ ค่าใช้จ่ายในการสนับสนุนปกติจะใช้กับคําถามและปัญหาการสนับสนุนเพิ่มเติมที่ไม่มีคุณสมบัติสําหรับการอัปเดตเฉพาะที่สงสัย
ข้อมูลการติดตั้ง
Microsoft แสดงตัวอย่างการเขียนโปรแกรมสําหรับภาพประกอบเท่านั้น โดยไม่มีการรับประกันทั้งโดยชัดแจ้งหรือโดยนัย ซึ่งรวมถึงแต่ไม่จํากัดเพียงการรับประกันโดยนัยถึงความสามารถในเชิงพาณิชย์หรือความเหมาะสมสําหรับวัตถุประสงค์เฉพาะ บทความนี้จะถือว่าคุณคุ้นเคยกับภาษาการเขียนโปรแกรมที่กําลังแสดงอยู่ และมีเครื่องมือที่ใช้สําหรับสร้างและแก้ไขจุดบกพร่องของกระบวนการ วิศวกรฝ่ายสนับสนุนของ Microsoft สามารถช่วยอธิบายฟังก์ชันการทํางานของกระบวนการเฉพาะได้ แต่จะไม่ปรับเปลี่ยนตัวอย่างเหล่านี้เพื่อให้มีฟังก์ชันการทํางานที่เพิ่มขึ้นหรือสร้างขั้นตอนต่างๆ เพื่อตอบสนองความต้องการเฉพาะของคุณ
หมายเหตุ ก่อนที่คุณจะติดตั้งโปรแกรมแก้ไขด่วนนี้ ตรวจสอบว่าผู้ใช้ไคลเอนต์ Microsoft Navision ทั้งหมดออกจากระบบ ซึ่งรวมถึงผู้ใช้ไคลเอนต์ Microsoft Navision Application Services (NAS) คุณควรเป็นผู้ใช้ไคลเอนต์เท่านั้นที่เข้าสู่ระบบเมื่อคุณใช้โปรแกรมแก้ไขด่วนนี้
เมื่อต้องการใช้โปรแกรมแก้ไขด่วนนี้
เราขอแนะนําให้ใช้บัญชีผู้ใช้ในหน้าต่าง ล็อกอินของ Windows หรือในหน้าต่าง ล็อกอินของฐานข้อมูล ถูกกําหนด ID บทบาท "SUPER" หากบัญชีผู้ใช้ไม่สามารถกําหนดรหัสบทบาท "SUPER" ได้ คุณต้องตรวจสอบว่าบัญชีผู้ใช้มีสิทธิ์ต่อไปนี้:
- สิทธิ์ในการปรับเปลี่ยนสําหรับวัตถุที่คุณจะเปลี่ยนแปลง
- สิทธิ์ Execute สําหรับวัตถุ System Object ID 5210 และสําหรับวัตถุ System Object ID 9015
หมายเหตุ คุณไม่มีสิทธิ์ในที่เก็บข้อมูล เว้นแต่คุณจะต้องดําเนินการซ่อมแซมข้อมูล
การเปลี่ยนแปลงโค้ด
หมายเหตุ ทดสอบการแก้ไขรหัสเสมอในสภาพแวดล้อมที่ควบคุมก่อนที่คุณจะนําการแก้ไขไปใช้กับคอมพิวเตอร์การผลิตของคุณ
เมื่อต้องการแก้ไขปัญหานี้ ให้ทําตามขั้นตอนต่อไปนี้:
เปลี่ยนรหัสในฟังก์ชันหมายเลขสินค้าข้อมูล 2 ในรายงาน BOM (99000753) การขยายปริมาณ ดังนี้:
รหัสที่มีอยู่ 1... BomComponent[Level]."Production BOM No." := Item."Production BOM No."; BomComponent[Level].SETRANGE("Production BOM No.",Item."Production BOM No."); BomComponent[Level].SETRANGE("Version Code",VersionCode[Level]); BomComponent[Level].SETFILTER("Starting Date",'%1|..%2',0D,CalculateDate); BomComponent[Level].SETFILTER("Ending Date",'%1|%2..',0D,CalculateDate); NoList[Level] := Item."No."; Quantity[Level] := UOMMgt.GetQtyPerUnitOfMeasure(Item,Item."Base Unit of Measure") / UOMMgt.GetQtyPerUnitOfMeasure( Item, ...รหัสทดแทน 1
... BomComponent[Level]."Production BOM No." := Item."Production BOM No."; BomComponent[Level].SETRANGE("Production BOM No.",Item."Production BOM No."); BomComponent[Level].SETRANGE("Version Code",VersionCode[Level]); BomComponent[Level].SETFILTER("Starting Date",'%1|..%2',0D,CalculateDate); BomComponent[Level].SETFILTER("Ending Date",'%1|%2..',0D,CalculateDate); // Add the following line. NoListType[Level] := NoListType[Level]::Item; // End of the added line. NoList[Level] := Item."No."; Quantity[Level] := UOMMgt.GetQtyPerUnitOfMeasure(Item,Item."Base Unit of Measure") / UOMMgt.GetQtyPerUnitOfMeasure( Item, ...รหัสที่มีอยู่ 2
... BEGIN WHILE BomComponent[Level].NEXT = 0 DO BEGIN Level := Level - 1; IF Level <1 THEN CurrReport.BREAK; // Delete the following line. IF NOT UpperLevelItem.GET(NoList[Level]) THEN // End of the deleted line. UpperLevelItem."Production BOM No." := NoList[Level]; BomComponent[Level].SETRANGE("Production BOM No.",UpperLevelItem."Production BOM No."); BomComponent[Level].SETRANGE("Version Code",VersionCode[Level]); END; ...รหัสทดแทน 2
... BEGIN WHILE BomComponent[Level].NEXT = 0 DO BEGIN Level := Level - 1; IF Level <1 THEN CurrReport.BREAK; // Add the following line. IF NoListType[NextLevel] = NoListType[NextLevel]::"Production BOM" THEN // End of the added line. UpperLevelItem."Production BOM No." := NoList[Level]; BomComponent[Level].SETRANGE("Production BOM No.",UpperLevelItem."Production BOM No."); BomComponent[Level].SETRANGE("Version Code",VersionCode[Level]); END; ...รหัสที่มีอยู่ 3
... BEGIN CompItem.GET(BomComponent[Level]."No."); IF CompItem."Production BOM No."<>'' THEN BEGIN NextLevel := Level + 1; CLEAR(BomComponent[NextLevel]); NoList[NextLevel] := CompItem."No."; VersionCode[NextLevel] := VersionMgt.GetBOMVersion(CompItem."Production BOM No.",CalculateDate,FALSE); BomComponent[NextLevel].SETRANGE("Production BOM No.",CompItem."Production BOM No."); BomComponent[NextLevel].SETRANGE("Version Code",VersionCode[NextLevel]); ...รหัสทดแทน 3
... BEGIN CompItem.GET(BomComponent[Level]."No."); IF CompItem."Production BOM No."<>'' THEN BEGIN NextLevel := Level + 1; CLEAR(BomComponent[NextLevel]); // Add the following line. NoListType[NextLevel] := NoListType[NextLevel]::Item; // End of the added line. NoList[NextLevel] := CompItem."No."; VersionCode[NextLevel] := VersionMgt.GetBOMVersion(CompItem."Production BOM No.",CalculateDate,FALSE); BomComponent[NextLevel].SETRANGE("Production BOM No.",CompItem."Production BOM No."); BomComponent[NextLevel].SETRANGE("Version Code",VersionCode[NextLevel]); ...รหัสที่มีอยู่ 4
... CompItem, VersionMgt.GetBOMUnitOfMeasure( CompItem."Production BOM No.",VersionCode[NextLevel])); END; IF Level > 1 THEN BEGIN // Delete the following lines. IF BomItem.GET(BomComponent[Level - 1]."No.") THEN BEGIN QtyPerUnitOfMeasure := UOMMgt.GetQtyPerUnitOfMeasure(BomItem,BomComponent[Level - 1]."Unit of Measure Code") / UOMMgt.GetQtyPerUnitOfMeasure( BomItem,VersionMgt.GetBOMUnitOfMeasure(BomItem."Production BOM No.",VersionCode[Level])); // End of the deleted lines. END; END; END; BomComponent[Level].Type::"Production BOM": BEGIN ...รหัสทดแทน 4
... CompItem, VersionMgt.GetBOMUnitOfMeasure( CompItem."Production BOM No.",VersionCode[NextLevel])); END; IF Level > 1 THEN BEGIN // Add the following lines. IF (BomComponent[Level - 1].Type = BomComponent[Level - 1].Type::Item) THEN BEGIN IF BomItem.GET(BomComponent[Level - 1]."No.") THEN BEGIN QtyPerUnitOfMeasure := UOMMgt.GetQtyPerUnitOfMeasure(BomItem,BomComponent[Level - 1]."Unit of Measure Code") / UOMMgt.GetQtyPerUnitOfMeasure( BomItem,VersionMgt.GetBOMUnitOfMeasure(BomItem."Production BOM No.",VersionCode[Level])); END; // End of the added lines. END; END; END; BomComponent[Level].Type::"Production BOM": BEGIN ...รหัสที่มีอยู่ 5
... BomComponent[Level].Type::"Production BOM": BEGIN ProdBOM.GET(BomComponent[Level]."No."); NextLevel := Level + 1; CLEAR(BomComponent[NextLevel]); NoList[NextLevel] := ProdBOM."No."; VersionCode[NextLevel] := VersionMgt.GetBOMVersion(ProdBOM."No.",CalculateDate,FALSE); BomComponent[NextLevel].SETRANGE("Production BOM No.",NoList[NextLevel]); BomComponent[NextLevel].SETRANGE("Version Code",VersionCode[NextLevel]); BomComponent[NextLevel].SETFILTER("Starting Date",'%1|..%2',0D,CalculateDate); ...รหัสทดแทน 5
... BomComponent[Level].Type::"Production BOM": BEGIN ProdBOM.GET(BomComponent[Level]."No."); NextLevel := Level + 1; CLEAR(BomComponent[NextLevel]); // Add the following line. NoListType[NextLevel] := NoListType[NextLevel]::"Production BOM"; // End of the added line. NoList[NextLevel] := ProdBOM."No."; VersionCode[NextLevel] := VersionMgt.GetBOMVersion(ProdBOM."No.",CalculateDate,FALSE); BomComponent[NextLevel].SETRANGE("Production BOM No.",NoList[NextLevel]); BomComponent[NextLevel].SETRANGE("Version Code",VersionCode[NextLevel]); BomComponent[NextLevel].SETFILTER("Starting Date",'%1|..%2',0D,CalculateDate); ...เปลี่ยนรหัสในตัวแปรสากลในรายงานการขยายปริมาณของ BOM (99000753) ดังนี้:
รหัสที่มีอยู่... Quantity@1013 : ARRAY [99] OF Decimal; QtyPerUnitOfMeasure@1014 : Decimal; Level@1015 : Integer; NextLevel@1016 : Integer; BOMQty@1017 : Decimal; BEGIN END. } RDLDATA ...รหัสทดแทน
... Quantity@1013 : ARRAY [99] OF Decimal; QtyPerUnitOfMeasure@1014 : Decimal; Level@1015 : Integer; NextLevel@1016 : Integer; BOMQty@1017 : Decimal; // Add the following line. NoListType@1018 : ARRAY [99] OF ' ,Item,Production BOM'; // End of the added line. BEGIN END. } RDLDATA ...
ข้อกำหนดเบื้องต้น
คุณต้องติดตั้งผลิตภัณฑ์ใดผลิตภัณฑ์หนึ่งต่อไปนี้เพื่อใช้โปรแกรมแก้ไขด่วนนี้:
- Microsoft Dynamics NAV 2009 Service Pack 1 (SP1)
- Microsoft Dynamics NAV 2009 R2
ลบข้อมูลออก
คุณไม่สามารถลบโปรแกรมแก้ไขด่วนนี้ได้
สถานะ
Microsoft ได้ยืนยันว่านี่เป็นปัญหาที่เกิดขึ้นกับผลิตภัณฑ์ของ Microsoft ที่แสดงไว้ในส่วน "นำไปใช้กับ"
การอ้างอิง
VSTF DynamicsNAV SE: 251802
หมายเหตุ นี่คือบทความ "เผยแพร่อย่างรวดเร็ว" ที่สร้างขึ้นโดยตรงจากภายในองค์กรสนับสนุนของ Microsoft ข้อมูลที่อยู่ในที่นี้มีให้เพื่อตอบสนองต่อปัญหาที่เกิดขึ้นใหม่ เนื่องจากความเร็วในการทําให้พร้อมใช้งานวัสดุอาจรวมถึงข้อผิดพลาดในการพิมพ์และอาจได้รับการแก้ไขได้ตลอดเวลาโดยไม่ต้องแจ้งให้ทราบ ดู ข้อตกลงการใช้งาน สําหรับข้อควรพิจารณาอื่นๆ