"保留条目不存在。标识字段和值︰ 条目编号 = [Entry_Number] 正是 ="错误消息当您尝试在 Microsoft Dynamics 2009 导航中发布工具包物料的销售订单

适用于: Dynamics NAV 2009

本文对所有国家/地区和语言的所有语言环境的 Microsoft Dynamics 导航 2009年。

症状


假定您启用工具包项目有足够的库存在 Microsoft Dynamics 导航 2009 R2 和 Microsoft Dynamics 导航 2009 Service Pack 1 (SP1) 中自动生成工具包物料清单设置和运行一个计划工作表。当您尝试发送工具包物料的销售订单时,您将收到以下错误消息︰
保留项不存在。标识字段和值︰ 输入编号 ='Entry_Number',正值 = 是

解决方案


修补程序信息

受支持的修补程序现已从 Microsoft 推出。然而,它仅用于纠正本文中描述的问题。它仅应用于正经历此特定问题的系统。此修补程序可能会接受进一步的测试。因此,如果这个问题没有对您造成严重的影响,我们建议您等待下一个 Microsoft Dynamics 导航 2009 服务包 或包含此修复程序的下一步的 Microsoft Dynamics 导航版本。


注意: 在特殊情况下,可免收的支持电话,可免收如果技术支持专业人员对 Microsoft Dynamics 和相关的产品的费用确定某个特定的更新能够解决您的问题。照常收取支持费用将应用于其他支持问题和对于特定更新无法解决的问题。


安装信息

Microsoft 提供的编程示例仅用于说明,没有任何明示或暗示的担保。这包括但不限于适销性或特定用途适用性的暗示担保。本文假定您熟悉所演示的编程语言和用于创建和调试过程的工具。Microsoft 的支持工程师可以帮助解释某个特定过程的功能,但是他们不会修改这些示例以提供额外的功能或构建过程以满足您的特定要求。

注意:安装此修复程序之前,请验证所有 Microsoft Navision 客户端用户都注销系统。这包括 Microsoft Navision 应用程序服务 (NAS) 客户端的用户。要实现此修补程序时,在登录的唯一客户端用户。

若要实现此修补程序,必须使用开发人员许可证。

我们建议在 Windows 登录窗口或数据库登录窗口中的用户帐户将分配该"超级"角色 id。如果不能将用户帐户分配成"超级"角色 ID,则必须验证用户帐户具有下列权限:
  • 您将更改该对象的修改权限。
  • 系统对象 ID ™ 5210对象和系统对象 ID 9015对象的 Execute 权限。


注意:您不需要具有对数据存储区的权限,除非您需要执行数据修复。

代码更改

注意:始终测试代码修复在受控环境中应用之前与您的生产计算机的修补程序。
要解决此问题,请更改库存配置文件偏移 codeUnit (99000854) 中的DemandtoInvProfile函数中的代码,如下所示︰

注意︰ 10/26/11 时到此知识库文章,以用于导航 5.0SP1 发布的代码的内联代码会略有变化。未更改的功能。替换代码中;"添加"一节中所更改的特定行

行︰ InventoryProfile。"行号": = LineNo;更改为︰ InventoryProfile。"行号": = NextLineNo;

行︰ LineNo: = LineNo + 1;已删除。

现有代码

...InventoryProfile.SETCURRENTKEY("Line No.");

SalesLine.SETCURRENTKEY(Type,"No.","Variant Code","Drop Shipment","Location Code","Document Type","Shipment Date");
SalesLine.SETFILTER("Document Type",'%1|%2',SalesLine."Document Type"::Order,SalesLine."Document Type"::"Return Order");
SalesLine.SETRANGE(Type,SalesLine.Type::Item);
SalesLine.SETRANGE("No.",Item."No.");
Item.COPYFILTER("Location Filter",SalesLine."Location Code");
Item.COPYFILTER("Variant Filter",SalesLine."Variant Code");
SalesLine.SETFILTER("Outstanding Qty. (Base)",'<>0');
SalesLine.SETFILTER("Shipment Date",'>%1&<=%2',0D,ToDate);

IF SalesLine.FIND('-') THEN
REPEAT
InventoryProfile.INIT;
InventoryProfile."Line No." := NextLineNo;
InventoryProfile.TransferFromSalesLine(SalesLine,TempItemTrkgEntry);
IF InventoryProfile.IsSupply THEN
InventoryProfile.ChangeSign;
InventoryProfile.INSERT;
UNTIL SalesLine.NEXT = 0;

ServiceLine.SETCURRENTKEY(Type,"No.","Variant Code","Location Code","Posting Date");
ServiceLine.SETRANGE("Document Type",ServiceLine."Document Type"::Order);
ServiceLine.SETRANGE(Type,ServiceLine.Type::Item);
ServiceLine.SETRANGE("No.",Item."No.");
Item.COPYFILTER("Location Filter",ServiceLine."Location Code");
Item.COPYFILTER("Variant Filter",ServiceLine."Variant Code");
ServiceLine.SETFILTER("Outstanding Qty. (Base)",'<>0');
ServiceLine.SETFILTER("Posting Date",'>%1&<=%2',0D,ToDate);

IF ServiceLine.FIND('-') THEN
REPEAT
InventoryProfile.INIT;
InventoryProfile."Line No." := NextLineNo;
InventoryProfile.TransferFromServiceInvLine(ServiceLine,TempItemTrkgEntry);
IF InventoryProfile.IsSupply THEN
InventoryProfile.ChangeSign;
InventoryProfile.INSERT;
UNTIL ServiceLine.NEXT = 0;

ReqLine.SETCURRENTKEY("Ref. Order Type","Ref. Order Status","Ref. Order No.","Ref. Line No.");
ReqLine.SETRANGE("Ref. Order Type",ReqLine."Ref. Order Type"::"Prod. Order");
ProdOrderComp.SETCURRENTKEY("Item No.","Variant Code","Location Code",Status,"Due Date");
ProdOrderComp.SETRANGE("Item No.",Item."No.");
Item.COPYFILTER("Location Filter",ProdOrderComp."Location Code");
Item.COPYFILTER("Variant Filter",ProdOrderComp."Variant Code");
ProdOrderComp.SETRANGE(Status,ProdOrderComp.Status::Planned,ProdOrderComp.Status::Released);
ProdOrderComp.SETFILTER("Due Date",'>%1&<=%2',0D,ToDate);

IF ProdOrderComp.FIND('-') THEN
REPEAT
ReqLine.SETRANGE("Ref. Order Status",ProdOrderComp.Status);
ReqLine.SETRANGE("Ref. Order No.",ProdOrderComp."Prod. Order No.");
ReqLine.SETRANGE("Ref. Line No.",ProdOrderComp."Prod. Order Line No.");
ReqLine.SETRANGE("Operation No.",'');
IF NOT ReqLine.FIND('-') THEN BEGIN
InventoryProfile.INIT;
InventoryProfile."Line No." := NextLineNo;
InventoryProfile.TransferFromComponent(ProdOrderComp,TempItemTrkgEntry);
IF InventoryProfile.IsSupply THEN
InventoryProfile.ChangeSign;
InventoryProfile.INSERT;
END;
UNTIL ProdOrderComp.NEXT = 0;

PlanningComponent.SETCURRENTKEY("Item No.","Variant Code","Location Code","Due Date");
PlanningComponent.SETRANGE("Item No.",Item."No.");
Item.COPYFILTER("Location Filter",PlanningComponent."Location Code");
Item.COPYFILTER("Variant Filter",PlanningComponent."Variant Code");
PlanningComponent.SETFILTER("Due Date",'>%1&<=%2',0D,ToDate);

IF PlanningComponent.FIND('-') THEN
REPEAT
InventoryProfile.INIT;
InventoryProfile."Line No." := NextLineNo;
InventoryProfile."Item No." := Item."No.";
InventoryProfile.TransferFromPlanComponent(PlanningComponent,TempItemTrkgEntry);
IF InventoryProfile.IsSupply THEN
InventoryProfile.ChangeSign;
InventoryProfile.INSERT;
UNTIL PlanningComponent.NEXT = 0;

TransferReqLine.SETCURRENTKEY(Type,"No.","Variant Code","Transfer-from Code","Transfer Shipment Date");
TransferReqLine.SETRANGE("Replenishment System",TransferReqLine."Replenishment System"::Transfer);
TransferReqLine.SETRANGE(Type,TransferReqLine.Type::Item);
TransferReqLine.SETRANGE("No.",Item."No.");
Item.COPYFILTER("Location Filter",TransferReqLine."Transfer-from Code");
Item.COPYFILTER("Variant Filter",TransferReqLine."Variant Code");
TransferReqLine.SETFILTER("Transfer Shipment Date",'>%1&<=%2',0D,ToDate);

IF TransferReqLine.FIND('-') THEN
REPEAT
InventoryProfile.INIT;
InventoryProfile."Line No." := NextLineNo;
InventoryProfile."Item No." := Item."No.";
InventoryProfile.TransferFromOutboundTransfPlan(TransferReqLine,TempItemTrkgEntry);
IF InventoryProfile.IsSupply THEN
InventoryProfile.ChangeSign;
InventoryProfile.INSERT;
UNTIL TransferReqLine.NEXT = 0;

TransLine.SETCURRENTKEY("Item No.");
TransLine.SETRANGE("Item No.",Item."No.");
Item.COPYFILTER("Variant Filter",TransLine."Variant Code");
Item.COPYFILTER("Location Filter",TransLine."Transfer-from Code");
TransLine.SETFILTER("Shipment Date",'>%1&<=%2',0D,ToDate);
FilterIsSetOnLocation := Item.GETFILTER("Location Filter") <> '';

IF TransLine.FIND('-') THEN
REPEAT
InventoryProfile.INIT;
InventoryProfile."Line No." := NextLineNo;
InventoryProfile."Item No." := Item."No.";
InventoryProfile.TransferFromOutboundTransfer(TransLine,TempItemTrkgEntry);
IF InventoryProfile.IsSupply THEN
InventoryProfile.ChangeSign;
IF FilterIsSetOnLocation THEN
InventoryProfile."Transfer Location Not Planned" := TransferLocationIsFilteredOut(Item,TransLine);
InventoryProfile.INSERT;
UNTIL TransLine.NEXT = 0;
...

替换代码

...InventoryProfile.SETCURRENTKEY("Line No.");

SalesLine.SETCURRENTKEY(Type,"No.","Variant Code","Drop Shipment","Location Code","Document Type","Shipment Date");
SalesLine.SETFILTER("Document Type",'%1|%2',SalesLine."Document Type"::Order,SalesLine."Document Type"::"Return Order");
SalesLine.SETRANGE(Type,SalesLine.Type::Item);
SalesLine.SETRANGE("No.",Item."No.");
Item.COPYFILTER("Location Filter",SalesLine."Location Code");
Item.COPYFILTER("Variant Filter",SalesLine."Variant Code");
SalesLine.SETFILTER("Outstanding Qty. (Base)",'<>0');
SalesLine.SETFILTER("Shipment Date",'>%1&<=%2',0D,ToDate);

// Add the following line.
SalesLine.SETRANGE("Build Kit",FALSE);
// End of the line.

IF SalesLine.FIND('-') THEN
REPEAT
InventoryProfile.INIT;
InventoryProfile."Line No." := NextLineNo;
InventoryProfile.TransferFromSalesLine(SalesLine,TempItemTrkgEntry);
IF InventoryProfile.IsSupply THEN
InventoryProfile.ChangeSign;
InventoryProfile.INSERT;
UNTIL SalesLine.NEXT = 0;

// Add the following lines.
KitSalesLine.SETCURRENTKEY("Document Type",Type,"No.","Variant Code","Location Code","Shipment Date");
KitSalesLine.SETRANGE("Document Type",KitSalesLine."Document Type"::Order);
KitSalesLine.SETRANGE(Type,KitSalesLine.Type::Item);
KitSalesLine.SETRANGE("No.",Item."No.");
Item.COPYFILTER("Location Filter",KitSalesLine."Location Code");
Item.COPYFILTER("Variant Filter",KitSalesLine."Variant Code");
KitSalesLine.SETFILTER("Outstanding Qty. (Base)",'<>0');
KitSalesLine.SETFILTER("Shipment Date",'>%1&<=%2',0D,ToDate);
IF KitSalesLine.FINDFIRST THEN
REPEAT
InventoryProfile.INIT;
InventoryProfile."Line No." := NextLineNo;
InventoryProfile.TransferFromKitSalesLine(KitSalesLine,TempItemTrkgEntry);
IF InventoryProfile.IsSupply THEN
InventoryProfile.ChangeSign;
InventoryProfile.INSERT;
UNTIL KitSalesLine.NEXT = 0;
// End of the lines.

ServiceLine.SETCURRENTKEY(Type,"No.","Variant Code","Location Code","Posting Date");
ServiceLine.SETRANGE("Document Type",ServiceLine."Document Type"::Order);
ServiceLine.SETRANGE(Type,ServiceLine.Type::Item);
ServiceLine.SETRANGE("No.",Item."No.");
Item.COPYFILTER("Location Filter",ServiceLine."Location Code");
Item.COPYFILTER("Variant Filter",ServiceLine."Variant Code");
ServiceLine.SETFILTER("Outstanding Qty. (Base)",'<>0');
ServiceLine.SETFILTER("Posting Date",'>%1&<=%2',0D,ToDate);

IF ServiceLine.FIND('-') THEN
REPEAT
InventoryProfile.INIT;
InventoryProfile."Line No." := NextLineNo;
InventoryProfile.TransferFromServiceInvLine(ServiceLine,TempItemTrkgEntry);
IF InventoryProfile.IsSupply THEN
InventoryProfile.ChangeSign;
InventoryProfile.INSERT;
UNTIL ServiceLine.NEXT = 0;

ReqLine.SETCURRENTKEY("Ref. Order Type","Ref. Order Status","Ref. Order No.","Ref. Line No.");
ReqLine.SETRANGE("Ref. Order Type",ReqLine."Ref. Order Type"::"Prod. Order");
ProdOrderComp.SETCURRENTKEY("Item No.","Variant Code","Location Code",Status,"Due Date");
ProdOrderComp.SETRANGE("Item No.",Item."No.");
Item.COPYFILTER("Location Filter",ProdOrderComp."Location Code");
Item.COPYFILTER("Variant Filter",ProdOrderComp."Variant Code");
ProdOrderComp.SETRANGE(Status,ProdOrderComp.Status::Planned,ProdOrderComp.Status::Released);
ProdOrderComp.SETFILTER("Due Date",'>%1&<=%2',0D,ToDate);

IF ProdOrderComp.FIND('-') THEN
REPEAT
ReqLine.SETRANGE("Ref. Order Status",ProdOrderComp.Status);
ReqLine.SETRANGE("Ref. Order No.",ProdOrderComp."Prod. Order No.");
ReqLine.SETRANGE("Ref. Line No.",ProdOrderComp."Prod. Order Line No.");
ReqLine.SETRANGE("Operation No.",'');
IF NOT ReqLine.FIND('-') THEN BEGIN
InventoryProfile.INIT;
InventoryProfile."Line No." := NextLineNo;
InventoryProfile.TransferFromComponent(ProdOrderComp,TempItemTrkgEntry);
IF InventoryProfile.IsSupply THEN
InventoryProfile.ChangeSign;
InventoryProfile.INSERT;
END;
UNTIL ProdOrderComp.NEXT = 0;

PlanningComponent.SETCURRENTKEY("Item No.","Variant Code","Location Code","Due Date");
PlanningComponent.SETRANGE("Item No.",Item."No.");
Item.COPYFILTER("Location Filter",PlanningComponent."Location Code");
Item.COPYFILTER("Variant Filter",PlanningComponent."Variant Code");
PlanningComponent.SETFILTER("Due Date",'>%1&<=%2',0D,ToDate);

IF PlanningComponent.FIND('-') THEN
REPEAT
InventoryProfile.INIT;
InventoryProfile."Line No." := NextLineNo;
InventoryProfile."Item No." := Item."No.";
InventoryProfile.TransferFromPlanComponent(PlanningComponent,TempItemTrkgEntry);
IF InventoryProfile.IsSupply THEN
InventoryProfile.ChangeSign;
InventoryProfile.INSERT;
UNTIL PlanningComponent.NEXT = 0;

TransferReqLine.SETCURRENTKEY(Type,"No.","Variant Code","Transfer-from Code","Transfer Shipment Date");
TransferReqLine.SETRANGE("Replenishment System",TransferReqLine."Replenishment System"::Transfer);
TransferReqLine.SETRANGE(Type,TransferReqLine.Type::Item);
TransferReqLine.SETRANGE("No.",Item."No.");
Item.COPYFILTER("Location Filter",TransferReqLine."Transfer-from Code");
Item.COPYFILTER("Variant Filter",TransferReqLine."Variant Code");
TransferReqLine.SETFILTER("Transfer Shipment Date",'>%1&<=%2',0D,ToDate);

IF TransferReqLine.FIND('-') THEN
REPEAT
InventoryProfile.INIT;
InventoryProfile."Line No." := NextLineNo;
InventoryProfile."Item No." := Item."No.";
InventoryProfile.TransferFromOutboundTransfPlan(TransferReqLine,TempItemTrkgEntry);
IF InventoryProfile.IsSupply THEN
InventoryProfile.ChangeSign;
InventoryProfile.INSERT;
UNTIL TransferReqLine.NEXT = 0;

TransLine.SETCURRENTKEY("Item No.");
TransLine.SETRANGE("Item No.",Item."No.");
Item.COPYFILTER("Variant Filter",TransLine."Variant Code");
Item.COPYFILTER("Location Filter",TransLine."Transfer-from Code");
TransLine.SETFILTER("Shipment Date",'>%1&<=%2',0D,ToDate);
FilterIsSetOnLocation := Item.GETFILTER("Location Filter") <> '';

IF TransLine.FIND('-') THEN
REPEAT
InventoryProfile.INIT;
InventoryProfile."Line No." := NextLineNo;
InventoryProfile."Item No." := Item."No.";
InventoryProfile.TransferFromOutboundTransfer(TransLine,TempItemTrkgEntry);
IF InventoryProfile.IsSupply THEN
InventoryProfile.ChangeSign;
IF FilterIsSetOnLocation THEN
InventoryProfile."Transfer Location Not Planned" := TransferLocationIsFilteredOut(Item,TransLine);
InventoryProfile.INSERT;
UNTIL TransLine.NEXT = 0;
...

系统必备组件

您必须具有要应用此修补程序的安装以下产品之一︰
  • Microsoft Dynamics NAV 2009 R2
  • Microsoft Dynamics 导航 2009 Service Pack 1

删除信息

您不能删除此修补程序。

状态


Microsoft 已经确认这是“适用于”一节中列出的 Microsoft 产品中的问题。
注意:这是直接从创建 Microsoft 支持部门内的"快速发布"的文章。此处包含的信息是作为为了响应新出现的问题而提供的。由于以使其可用的速度,而材料可能包含印刷错误,恕不另行通知,随时可能进行修订。其他考虑因素,请参阅使用条款