« L’entrée de réservation n’existe pas. Champs et valeurs d’identification : Entrée No.='[Entry_Number]',Positive='Yes'" message d’erreur lorsque vous essayez de publier une commande client pour un article kit dans Microsoft Dynamics NAV 2009

S’applique à
Dynamics NAV 2009

Cet article s’applique à Microsoft Dynamics NAV 2009 pour tous les pays et tous les paramètres régionaux de langue.

Symptômes

Supposons que vous exécutez une feuille de planification et que vous activez le paramètre BoM du Kit de build automatique pour un élément du Kit qui a suffisamment de stock dans Microsoft Dynamics NAV 2009 R2 et Microsoft Dynamics NAV 2009 Service Pack 1 (SP1). Lorsque vous essayez de publier une commande client pour l’article Kit, vous recevez le message d’erreur suivant :

Remarque

L’entrée de réservation n’existe pas. Champs et valeurs d’identification : Entrée Non.='Entry_Number',Positive='Oui'

Résolution

Informations sur le correctif logiciel

Un correctif logiciel pris en charge est désormais disponible auprès de Microsoft. Toutefois, il est uniquement destiné à corriger le problème décrit dans cet article. Appliquez-la uniquement aux systèmes qui rencontrent ce problème spécifique. Ce correctif logiciel peut recevoir des tests supplémentaires. Par conséquent, si vous n’êtes pas gravement affecté par ce problème, nous vous recommandons d’attendre le prochain Service Pack Microsoft Dynamics NAV 2009 ou la prochaine version de Microsoft Dynamics NAV qui contient ce correctif logiciel.

Remarque Dans des cas particuliers, les frais habituellement engagés pour les appels de support peuvent être annulés si un professionnel du support technique pour Microsoft Dynamics et les produits associés détermine qu’une mise à jour spécifique permettra de résoudre votre problème. Les coûts habituels du support technique s’appliqueront aux autres questions et problèmes non directement liés à la mise à jour en question.

            
          

Informations sur l’installation

Microsoft fournit des exemples de programmation à des fins d’illustration uniquement, sans garantie exprimée ou implicite. Cela inclut, sans s’y limiter, les garanties implicites de qualité commerciale ou d’adéquation à un usage particulier. Cet article part du principe que vous êtes familiarisé avec le langage de programmation présenté et avec les outils utilisés pour créer et déboguer des procédures. Les techniciens du Support technique Microsoft peuvent vous expliquer les fonctionnalités d'une procédure particulière, mais ils ne peuvent pas modifier les exemples en vue de vous fournir des fonctionnalités supplémentaires ou de créer des procédures répondant à vos besoins spécifiques.

Remarque Avant d’installer ce correctif logiciel, vérifiez que tous les utilisateurs du client Microsoft Navision sont déconnectés du système. Cela inclut les utilisateurs du client Nas (Microsoft Navision Application Services). Vous devez être le seul utilisateur client connecté lorsque vous implémentez ce correctif logiciel.

Pour implémenter ce correctif logiciel, vous devez disposer d’une licence de développeur.

Nous vous recommandons d’attribuer au compte d’utilisateur dans la fenêtre Connexions Windows ou dans la fenêtre Connexions de base de données l’ID de rôle « SUPER ». Si l’ID de rôle « SUPER » ne peut pas être attribué au compte d’utilisateur, vous devez vérifier que le compte d’utilisateur dispose des autorisations suivantes :

  • Autorisation Modifier pour l’objet que vous allez modifier.
  • Autorisation Exécuter pour l’objet ID d’objet système 5210 et pour l’objet ID d’objet système 9015.

                
Remarque Vous n’avez pas besoin de disposer de droits sur les magasins de données, sauf si vous devez effectuer une réparation des données.

Modifications du code

Remarque Toujours tester les correctifs de code dans un environnement contrôlé avant d’appliquer les correctifs à vos ordinateurs de production.
Pour résoudre ce problème, modifiez le code dans la fonction DemandtoInvProfile dans inventory Profile Offsetting codeUnit (99000854) comme suit :

Remarque : 26/10/11, il y a eu une légère modification dans cette base de connaissances pour rendre le code inline avec le code qui a été publié pour NAV 5.0SP1. La fonctionnalité n’a pas changé. Les lignes spécifiques qui ont changé se trouvent dans la section « Ajouter » du code de remplacement ;

Ligne : InventoryProfile." Ligne No." := LineNo ; remplacez par : InventoryProfile. » Ligne Non." := NextLineNo ;

Ligne : LineNo := LineNo +1 ; a été supprimé.

Code existant

...
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;
...

Code de remplacement

...
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;
...

Configuration requise

L’un des produits suivants doit être installé pour appliquer ce correctif :

  • Microsoft Dynamics NAV 2009 R2
  • Microsoft Dynamics NAV 2009 Service Pack 1

Informations sur la suppression

Vous ne pouvez pas supprimer ce correctif logiciel.

État

Microsoft a confirmé qu’il s’agissait d’un problème dans les produits Microsoft répertoriés dans la section « S’applique à ».

Remarque Il s’agit d'un article de « dernière minute » créé directement à partir de l’organisation de support technique Microsoft. Les informations présentées ici sont fournies telles quelles en réponse à des problèmes nouveaux. En raison de la rapidité de leur mise à disposition, les documents peuvent contenir des erreurs typographiques et être modifiés à tout moment sans préavis. Consultez les Conditions d’utilisation pour d’autres considérations.