Sales Order webservice problem (no Sales_Order_Line method)

AndersaaAndersaa Member Posts: 15
edited 2013-02-10 in NAV Three Tier
I have tried to use the Sales Order web service (Page 42) from a asp.net c# application.
NAV is 2009 R2.

My c# code :
SalesOrder.SalesOrder_Service SOService = new SalesOrder.SalesOrder_Service(); 
SOService.UseDefaultCredentials = true;

// Create the Order header 
SalesOrder.SalesOrder newOrder = new SalesOrder.SalesOrder();
SOService.Create(ref newOrder);

// Update Order header 
newOrder.Sell_to_Customer_No = "10000";

// Create Order lines
newOrder.SalesLines = new Sales_Order_Line[2];
for (int idx = 0; idx < 2; idx++)
     newOrder.SalesLines[idx] = new Sales_Order_Line();

SOService.Update(ref newOrder);

Webservice is added normally as webreference.

My big problem is that the method SalesLines (newOrder.SalesLines) is not recognized by the intellisense.
So obviously my code will not run because it fails to compile.
If i skip the SalesLine part the order is inserted and updated as expected in NAV.
Does anyone in here have an idea of the problem ?

/Anders

Comments

  • yukonyukon Member Posts: 361
    Hi Andersaa,

    Try with below sample code.
                SalesOrder.Sales_Order_Service _Sales_Order_Service = new SalesOrder.Sales_Order_Service();            
                _Sales_Order_Service.Url = "http://localhost:7047/DynamicsNAV3/WS/CompanyName/Page/Sales_Order";
                _Sales_Order_Service.UseDefaultCredentials = true;
    
                SalesOrder.Sales_Order _SalesOrder = new SalesOrder.Sales_Order();
                _Sales_Order_Service.Create(ref _SalesOrder);
                _SalesOrder.Sell_to_Customer_No = "10000";
                _Sales_Order_Service.Update(ref _SalesOrder);
    
                for (int idx = 0; idx < 2; idx++)
                {
                    _SalesOrder.SalesLines = new SalesOrder.Sales_Order_Line[idx+1];
                    _SalesOrder.SalesLines[idx] = new SalesOrder.Sales_Order_Line();
                    _SalesOrder.SalesLines[idx].Type = SalesOrder.Type.Item;
                    _Sales_Order_Service.Update(ref _SalesOrder);
                }
    

    Best Regards,
    Yukon
    Make Simple & Easy
  • AndersaaAndersaa Member Posts: 15
    Basically your code is excact the same as the one i use.

    But still no SalesLines method available, could it be a problem with the SalesOrder page i NAV ?
    If there is Custom Code in the page, could that make it corrupt ?

    /Anders
  • AndersaaAndersaa Member Posts: 15
    No one have an idea to this problem ?

    /Anders
  • companycompany Member Posts: 89
    Hello,

    After adding the Web Reference in the application you will have a Webrefernece suppose
    say i have added it as salesorder

    SalesOrder.Sales_Order_Line will give the information regarding the sales lines.

    Hope this is what you are looking..
  • companycompany Member Posts: 89
    Replying to the above reply

    from your code i see that tis is what you have writeen

    newOrder.SalesLines = new Sales_Order_Line[2];

    but it should be declared as

    NewOrder.Sales_Order_Line ss = new Sales_Order_Line();
  • AndersaaAndersaa Member Posts: 15
    company wrote:
    Replying to the above reply

    from your code i see that tis is what you have writeen

    newOrder.SalesLines = new Sales_Order_Line[2];

    but it should be declared as

    NewOrder.Sales_Order_Line ss = new Sales_Order_Line();

    Problem is still that intellisense in vs does not give me the method "SalesLines" or "Sales_Order_Line".
    I think problem lays somewhere else, but just can't figure it out.

    Does any one have a codesnippet from vs2008/2010 C# that gives the method ?

    /Anders
  • AndersaaAndersaa Member Posts: 15
    Really no one have an idea ?

    See attached photo.
  • yukonyukon Member Posts: 361
    Hi Andersaa,

    I thought your problem is solved. :mrgreen: Do you use standard page for your webservice or your customize? If you don't mind can you show your Page at here.

    Regards,
    Yukon
    Make Simple & Easy
  • AndersaaAndersaa Member Posts: 15
    I have tried both a customized and a standard, makes no difference.

    This is the standard page i am testing against at the moment.
    OBJECT Page 42 Sales Order
    {
      OBJECT-PROPERTIES
      {
        Date=11-12-10;
        Time=12:00:00;
        Version List=NAVW16.00.10,NAVDK6.00;
      }
      PROPERTIES
      {
        CaptionML=[DAN=Salgsordre;
                   ENU=Sales Order];
        SourceTable=Table36;
        SourceTableView=WHERE(Document Type=FILTER(Order));
        PageType=Document;
        RefreshOnActivate=Yes;
        OnOpenPage=BEGIN
                     IF UserMgt.GetSalesFilter() <> '' THEN BEGIN
                       FILTERGROUP(2);
                       SETRANGE("Responsibility Center",UserMgt.GetSalesFilter());
                       FILTERGROUP(0);
                     END;
    
                     SETRANGE("Date Filter",0D,WORKDATE - 1);
                   END;
    
        OnNewRecord=BEGIN
                      "Responsibility Center" := UserMgt.GetSalesFilter();
                    END;
    
        OnInsertRecord=BEGIN
                         CheckCreditMaxBeforeInsert;
                       END;
    
        OnDeleteRecord=BEGIN
                         CurrPage.SAVERECORD;
                         EXIT(ConfirmDeletion);
                       END;
    
        ActionList=ACTIONS
        {
          { 1900000003;0 ;ActionContainer;
                          ActionContainerType=RelatedInformation }
          { 59      ;1   ;ActionGroup;
                          CaptionML=[DAN=&Ordre;
                                     ENU=O&rder] }
          { 61      ;2   ;Action    ;
                          ShortCutKey=F7;
                          CaptionML=[DAN=Statistik;
                                     ENU=Statistics];
                          Promoted=Yes;
                          Image=Statistics;
                          PromotedCategory=Process;
                          OnAction=BEGIN
                                     CalcInvDiscForHeader;
                                     COMMIT;
                                     FORM.RUNMODAL(FORM::"Sales Order Statistics",Rec);
                                   END;
                                    }
          { 62      ;2   ;Action    ;
                          ShortCutKey=Shift+F7;
                          CaptionML=[DAN=Kort;
                                     ENU=Card];
                          RunObject=Page 21;
                          RunFormLink=No.=FIELD(Sell-to Customer No.);
                          Image=EditLines }
          { 63      ;2   ;Action    ;
                          CaptionML=[DAN=Be&m‘rkning;
                                     ENU=Co&mments];
                          RunObject=Page 67;
                          RunFormLink=Document Type=FIELD(Document Type),
                                      No.=FIELD(No.),
                                      Document Line No.=CONST(0);
                          Image=ViewComments }
          { 64      ;2   ;Action    ;
                          CaptionML=[DAN=&Leverancer;
                                     ENU=S&hipments];
                          RunObject=Page 142;
                          RunFormView=SORTING(Order No.);
                          RunFormLink=Order No.=FIELD(No.) }
          { 65      ;2   ;Action    ;
                          CaptionML=[DAN=Fakturaer;
                                     ENU=Invoices];
                          RunObject=Page 143;
                          RunFormView=SORTING(Order No.);
                          RunFormLink=Order No.=FIELD(No.);
                          Image=Invoice }
          { 234     ;2   ;Action    ;
                          CaptionML=[DAN=For&udbetalingsfakturaer;
                                     ENU=Prepa&yment Invoices];
                          RunObject=Page 143;
                          RunFormView=SORTING(Prepayment Order No.);
                          RunFormLink=Prepayment Order No.=FIELD(No.) }
          { 235     ;2   ;Action    ;
                          CaptionML=[DAN=Forudbetalingskred&itnotaer;
                                     ENU=Prepayment Credi&t Memos];
                          RunObject=Page 144;
                          RunFormView=SORTING(Prepayment Order No.);
                          RunFormLink=Prepayment Order No.=FIELD(No.) }
          { 122     ;2   ;Action    ;
                          CaptionML=[DAN=Dimensioner;
                                     ENU=Dimensions];
                          Image=Dimensions;
                          OnAction=BEGIN
                                     Rec.ShowDocDim;
                                   END;
                                    }
          { 78      ;2   ;Action    ;
                          CaptionML=[DAN=God&kendelser;
                                     ENU=A&pprovals];
                          Image=Approvals;
                          OnAction=VAR
                                     ApprovalEntries@1001 : Form 658;
                                   BEGIN
                                     ApprovalEntries.Setfilters(DATABASE::"Sales Header","Document Type","No.");
                                     ApprovalEntries.RUN;
                                   END;
                                    }
          { 173     ;2   ;Separator  }
          { 168     ;2   ;Action    ;
                          CaptionML=[DAN=Lagerleverancelinjer;
                                     ENU=Whse. Shipment Lines];
                          RunObject=Page 7341;
                          RunFormView=SORTING(Source Type,Source Subtype,Source No.,Source Line No.);
                          RunFormLink=Source Type=CONST(37),
                                      Source Subtype=FIELD(Document Type),
                                      Source No.=FIELD(No.) }
          { 150     ;2   ;Action    ;
                          CaptionML=[DAN=L&‘g-p†-lager/pluklinjer (lag.);
                                     ENU=In&vt. Put-away/Pick Lines];
                          RunObject=Page 5774;
                          RunFormView=SORTING(Source Document,Source No.,Location Code);
                          RunFormLink=Source Document=CONST(Sales Order),
                                      Source No.=FIELD(No.) }
          { 120     ;2   ;Separator  }
          { 121     ;2   ;Action    ;
                          CaptionML=[DAN=&Planl‘gning;
                                     ENU=Pla&nning];
                          OnAction=VAR
                                     SalesPlanForm@1001 : Form 99000883;
                                   BEGIN
                                     SalesPlanForm.SetSalesOrder("No.");
                                     SalesPlanForm.RUNMODAL;
                                   END;
                                    }
          { 197     ;2   ;Action    ;
                          CaptionML=[DAN=Beregning af leverings&tid;
                                     ENU=Order &Promising];
                          OnAction=VAR
                                     OrderPromisingLine@1000 : TEMPORARY Record 99000880;
                                   BEGIN
                                     OrderPromisingLine.SETRANGE("Source Type","Document Type");
                                     OrderPromisingLine.SETRANGE("Source ID","No.");
                                     FORM.RUNMODAL(FORM::"Order Promising Lines",OrderPromisingLine);
                                   END;
                                    }
          { 258     ;2   ;Separator  }
          { 259     ;2   ;Action    ;
                          CaptionML=[DAN=Transaktionslo&gfilposter for kreditkort;
                                     ENU=Credit Cards Transaction Lo&g Entries];
                          RunObject=Page 829;
                          RunFormLink=Document Type=FIELD(Document Type),
                                      Document No.=FIELD(No.),
                                      Customer No.=FIELD(Bill-to Customer No.) }
          { 1900000004;0 ;ActionContainer;
                          ActionContainerType=ActionItems }
          { 66      ;1   ;ActionGroup;
                          CaptionML=[DAN=Fu&nktion;
                                     ENU=F&unctions] }
          { 67      ;2   ;Action    ;
                          CaptionML=[DAN=&Beregn fakturarabat;
                                     ENU=Calculate &Invoice Discount];
                          Image=CalculateInvoiceDiscount;
                          OnAction=BEGIN
                                     ApproveCalcInvDisc;
                                   END;
                                    }
          { 172     ;2   ;Separator  }
          { 167     ;2   ;Action    ;
                          Ellipsis=Yes;
                          CaptionML=[DAN=Hent st&d.deb.salgskoder;
                                     ENU=Get St&d. Cust. Sales Codes];
                          OnAction=VAR
                                     StdCustSalesCode@1000 : Record 172;
                                   BEGIN
                                     StdCustSalesCode.InsertSalesLines(Rec);
                                   END;
                                    }
          { 171     ;2   ;Separator  }
          { 68      ;2   ;Action    ;
                          Ellipsis=Yes;
                          CaptionML=[DAN=Kopier linjer;
                                     ENU=Copy Document];
                          Promoted=Yes;
                          Image=CopyDocument;
                          PromotedCategory=Process;
                          OnAction=BEGIN
                                     CopySalesDoc.SetSalesHeader(Rec);
                                     CopySalesDoc.RUNMODAL;
                                     CLEAR(CopySalesDoc);
                                   END;
                                    }
          { 196     ;2   ;Action    ;
                          CaptionML=[DAN=&Arkiver dokument;
                                     ENU=Archi&ve Document];
                          OnAction=BEGIN
                                     ArchiveManagement.ArchiveSalesDocument(Rec);
                                     CurrPage.UPDATE(FALSE);
                                   END;
                                    }
          { 154     ;2   ;Action    ;
                          Ellipsis=Yes;
                          CaptionML=[DAN=Flyt negative linjer;
                                     ENU=Move Negative Lines];
                          OnAction=BEGIN
                                     CLEAR(MoveNegSalesLines);
                                     MoveNegSalesLines.SetSalesHeader(Rec);
                                     MoveNegSalesLines.RUNMODAL;
                                     MoveNegSalesLines.ShowDocument;
                                   END;
                                    }
          { 195     ;2   ;Separator  }
          { 149     ;2   ;Action    ;
                          CaptionML=[DAN=Opre&t lagerleverance;
                                     ENU=Create &Whse. Shipment];
                          OnAction=VAR
                                     GetSourceDocOutbound@1001 : Codeunit 5752;
                                   BEGIN
                                     GetSourceDocOutbound.CreateFromSalesOrder(Rec);
    
                                     IF NOT FIND('=><') THEN
                                       INIT;
                                   END;
                                    }
          { 148     ;2   ;Action    ;
                          Ellipsis=Yes;
                          CaptionML=[DAN=Opret l&‘g-p†-lager/pluk (lager);
                                     ENU=Create Inventor&y Put-away / Pick];
                          Promoted=Yes;
                          Image=CreateInventoryPickup;
                          PromotedCategory=Process;
                          OnAction=BEGIN
                                     CreateInvtPutAwayPick;
    
                                     IF NOT FIND('=><') THEN
                                       INIT;
                                   END;
                                    }
          { 174     ;2   ;Separator  }
          { 250     ;2   ;Action    ;
                          CaptionML=[DAN=Send go&dkendelsesanmodning;
                                     ENU=Send A&pproval Request];
                          Image=SendApprovalRequest;
                          OnAction=VAR
                                     ApprovalMgt@1001 : Codeunit 439;
                                     "Release Sales Document"@1002 : Codeunit 414;
                                   BEGIN
                                     IF ApprovalMgt.SendSalesApprovalRequest(Rec) THEN;
                                   END;
                                    }
          { 251     ;2   ;Action    ;
                          CaptionML=[DAN=Annuller godkendelsesan&modning;
                                     ENU=Cancel Approval Re&quest];
                          OnAction=VAR
                                     ApprovalMgt@1001 : Codeunit 439;
                                     "Release Sales Document"@1002 : Codeunit 414;
                                   BEGIN
                                     IF ApprovalMgt.CancelSalesApprovalRequest(Rec,TRUE,TRUE) THEN;
                                   END;
                                    }
          { 175     ;2   ;Separator  }
          { 133     ;2   ;Action    ;
                          ShortCutKey=Ctrl+F9;
                          CaptionML=[DAN=&Frigiv;
                                     ENU=Re&lease];
                          Promoted=Yes;
                          Image=ReleaseDoc;
                          PromotedCategory=Process;
                          OnAction=VAR
                                     ReleaseSalesDoc@1000 : Codeunit 414;
                                   BEGIN
                                     ReleaseSalesDoc.PerformManualRelease(Rec);
                                   END;
                                    }
          { 134     ;2   ;Action    ;
                          CaptionML=[DAN=&bn igen;
                                     ENU=Re&open];
                          Promoted=Yes;
                          Image=ReOpen;
                          PromotedCategory=Process;
                          OnAction=VAR
                                     ReleaseSalesDoc@1001 : Codeunit 414;
                                   BEGIN
                                     ReleaseSalesDoc.PerformManualReopen(Rec);
                                   END;
                                    }
          { 608     ;2   ;Separator  }
          { 193     ;2   ;Action    ;
                          CaptionML=[DAN=Send Bi&zTalk-salgsordrebekr‘ftelse;
                                     ENU=&Send BizTalk Sales Order Cnfmn.];
                          OnAction=VAR
                                     BizTalkManagement@1000 : Codeunit 99008508;
                                     ApprovalMgt@1003 : Codeunit 439;
                                     PurchaseHeader@1002 : Record 38;
                                   BEGIN
                                     IF ApprovalMgt.PrePostApprovalCheck(Rec,PurchaseHeader) THEN
                                       BizTalkManagement.SendSalesOrderConf(Rec);
                                   END;
                                    }
          { 204     ;2   ;Action    ;
                          CaptionML=[DAN=Send IC-salgsordrebekr‘ftelse;
                                     ENU=Send IC Sales Order Cnfmn.];
                          OnAction=VAR
                                     ICInOutboxMgt@1000 : Codeunit 427;
                                     ApprovalMgt@1003 : Codeunit 439;
                                     PurchaseHeader@1002 : Record 38;
                                   BEGIN
                                     IF ApprovalMgt.PrePostApprovalCheck(Rec,PurchaseHeader) THEN
                                       ICInOutboxMgt.SendSalesDoc(Rec,FALSE);
                                   END;
                                    }
          { 255     ;2   ;Separator  }
          { 256     ;2   ;Action    ;
                          CaptionML=[DAN=Godkend;
                                     ENU=Authorize];
                          OnAction=BEGIN
                                     Authorize;
                                   END;
                                    }
          { 257     ;2   ;Action    ;
                          CaptionML=[DAN=Ann&uller godkendelse;
                                     ENU=Void A&uthorize];
                          OnAction=BEGIN
                                     Void;
                                   END;
                                    }
          { 73      ;1   ;ActionGroup;
                          CaptionML=[DAN=&Bogf›ring;
                                     ENU=P&osting] }
          { 74      ;2   ;Action    ;
                          Ellipsis=Yes;
                          CaptionML=[DAN=Kontroller;
                                     ENU=Test Report];
                          Image=TestReport;
                          OnAction=BEGIN
                                     ReportPrint.PrintSalesHeader(Rec);
                                   END;
                                    }
          { 75      ;2   ;Action    ;
                          ShortCutKey=F9;
                          Ellipsis=Yes;
                          CaptionML=[DAN=B&ogf›r;
                                     ENU=P&ost];
                          Promoted=Yes;
                          PromotedIsBig=Yes;
                          Image=Post;
                          PromotedCategory=Process;
                          OnAction=VAR
                                     PurchaseHeader@1002 : Record 38;
                                     ApprovalMgt@1001 : Codeunit 439;
                                   BEGIN
                                     IF ApprovalMgt.PrePostApprovalCheck(Rec,PurchaseHeader) THEN BEGIN
                                       IF ApprovalMgt.TestSalesPrepayment(Rec) THEN
                                         ERROR(STRSUBSTNO(Text001,"Document Type","No."))
                                       ELSE BEGIN
                                         IF ApprovalMgt.TestSalesPayment(Rec) THEN
                                           ERROR(STRSUBSTNO(Text002,"Document Type","No."))
                                         ELSE
                                           CODEUNIT.RUN(CODEUNIT::"Sales-Post (Yes/No)",Rec);
                                       END;
                                     END;
                                   END;
                                    }
          { 76      ;2   ;Action    ;
                          ShortCutKey=Shift+F9;
                          Ellipsis=Yes;
                          CaptionML=[DAN=Bogf›r og &udskriv;
                                     ENU=Post and &Print];
                          Promoted=Yes;
                          PromotedIsBig=Yes;
                          Image=PostPrint;
                          PromotedCategory=Process;
                          OnAction=VAR
                                     PurchaseHeader@1001 : Record 38;
                                     ApprovalMgt@1002 : Codeunit 439;
                                   BEGIN
                                     IF ApprovalMgt.PrePostApprovalCheck(Rec,PurchaseHeader) THEN BEGIN
                                       IF ApprovalMgt.TestSalesPrepayment(Rec) THEN
                                         ERROR(STRSUBSTNO(Text001,"Document Type","No."))
                                       ELSE BEGIN
                                         IF ApprovalMgt.TestSalesPayment(Rec) THEN
                                           ERROR(STRSUBSTNO(Text002,"Document Type","No."))
                                         ELSE
                                           CODEUNIT.RUN(CODEUNIT::"Sales-Post + Print",Rec);
                                       END;
                                     END;
                                   END;
                                    }
          { 77      ;2   ;Action    ;
                          Ellipsis=Yes;
                          CaptionML=[DAN=Masse&bogf›r;
                                     ENU=Post &Batch];
                          Image=PostBatch;
                          OnAction=BEGIN
                                     REPORT.RUNMODAL(REPORT::"Batch Post Sales Orders",TRUE,TRUE,Rec);
                                     CurrPage.UPDATE(FALSE);
                                   END;
                                    }
          { 230     ;2   ;Separator  }
          { 236     ;2   ;ActionGroup;
                          CaptionML=[DAN=For&udbetaling;
                                     ENU=Prepa&yment] }
          { 231     ;3   ;Action    ;
                          Ellipsis=Yes;
                          CaptionML=[DAN=Forudbetalings&testrapport;
                                     ENU=Prepayment &Test Report];
                          OnAction=BEGIN
                                     ReportPrint.PrintSalesHeaderPrepmt(Rec);
                                   END;
                                    }
          { 232     ;3   ;Action    ;
                          Ellipsis=Yes;
                          CaptionML=[DAN=Bogf›r forudbetalings&faktura;
                                     ENU=Post Prepayment &Invoice];
                          OnAction=VAR
                                     PurchaseHeader@1002 : Record 38;
                                     SalesPostYNPrepmt@1000 : Codeunit 443;
                                   BEGIN
                                     IF ApprovalMgt.PrePostApprovalCheck(Rec,PurchaseHeader) THEN
                                       SalesPostYNPrepmt.PostPrepmtInvoiceYN(Rec,FALSE);
                                   END;
                                    }
          { 237     ;3   ;Action    ;
                          Ellipsis=Yes;
                          CaptionML=[DAN=Bogf›r og udskriv forudb&etalingsfaktura;
                                     ENU=Post and Print Prepmt. Invoic&e];
                          OnAction=VAR
                                     PurchaseHeader@1002 : Record 38;
                                     SalesPostYNPrepmt@1000 : Codeunit 443;
                                   BEGIN
                                     IF ApprovalMgt.PrePostApprovalCheck(Rec,PurchaseHeader) THEN
                                       SalesPostYNPrepmt.PostPrepmtInvoiceYN(Rec,TRUE);
                                   END;
                                    }
          { 233     ;3   ;Action    ;
                          Ellipsis=Yes;
                          CaptionML=[DAN=Bogf›r forudbetalings&kreditnota;
                                     ENU=Post Prepayment &Credit Memo];
                          OnAction=VAR
                                     PurchaseHeader@1002 : Record 38;
                                     SalesPostYNPrepmt@1000 : Codeunit 443;
                                   BEGIN
                                     IF ApprovalMgt.PrePostApprovalCheck(Rec,PurchaseHeader) THEN
                                       SalesPostYNPrepmt.PostPrepmtCrMemoYN(Rec,FALSE);
                                   END;
                                    }
          { 238     ;3   ;Action    ;
                          Ellipsis=Yes;
                          CaptionML=[DAN=Bogf›r og udskriv forudbetalingskreditn&ota;
                                     ENU=Post and Print Prepmt. Cr. Mem&o];
                          OnAction=VAR
                                     PurchaseHeader@1002 : Record 38;
                                     SalesPostYNPrepmt@1000 : Codeunit 443;
                                   BEGIN
                                     IF ApprovalMgt.PrePostApprovalCheck(Rec,PurchaseHeader) THEN
                                       SalesPostYNPrepmt.PostPrepmtCrMemoYN(Rec,TRUE);
                                   END;
                                    }
          { 223     ;1   ;ActionGroup;
                          CaptionML=[DAN=U&dskriv;
                                     ENU=&Print] }
          { 224     ;2   ;Action    ;
                          Ellipsis=Yes;
                          CaptionML=[DAN=Ordrebekr‘ftelse;
                                     ENU=Order Confirmation];
                          Image=Print;
                          OnAction=BEGIN
                                     DocPrint.PrintSalesOrder(Rec,Usage::"Order Confirmation");
                                   END;
                                    }
          { 225     ;2   ;Action    ;
                          Ellipsis=Yes;
                          CaptionML=[DAN=Arbejdsseddel;
                                     ENU=Work Order];
                          Image=Print;
                          OnAction=BEGIN
                                     DocPrint.PrintSalesOrder(Rec,Usage::"Work Order");
                                   END;
                                    }
        }
      }
      CONTROLS
      {
        { 1900000001;0;Container;
                    ContainerType=ContentArea }
    
        { 1   ;1   ;Group     ;
                    CaptionML=[DAN=Generelt;
                               ENU=General] }
    
        { 2   ;2   ;Field     ;
                    SourceExpr="No.";
                    Importance=Promoted;
                    OnAssistEdit=BEGIN
                                   IF AssistEdit(xRec) THEN
                                     CurrPage.UPDATE;
                                 END;
                                  }
    
        { 4   ;2   ;Field     ;
                    SourceExpr="Sell-to Customer No.";
                    Importance=Promoted;
                    OnValidate=BEGIN
                                 SelltoCustomerNoOnAfterValidat;
                               END;
                                }
    
        { 157 ;2   ;Field     ;
                    SourceExpr="Sell-to Contact No.";
                    Importance=Additional }
    
        { 6   ;2   ;Field     ;
                    SourceExpr="Sell-to Customer Name" }
    
        { 81  ;2   ;Field     ;
                    SourceExpr="Sell-to Address";
                    Importance=Additional }
    
        { 83  ;2   ;Field     ;
                    SourceExpr="Sell-to Address 2";
                    Importance=Additional }
    
        { 72  ;2   ;Field     ;
                    SourceExpr="Sell-to Post Code";
                    Importance=Additional }
    
        { 86  ;2   ;Field     ;
                    SourceExpr="Sell-to City" }
    
        { 8   ;2   ;Field     ;
                    SourceExpr="Sell-to Contact";
                    Importance=Additional }
    
        { 1101100000;2;Field  ;
                    SourceExpr="Sell-to Contact Phone No." }
    
        { 1101100002;2;Field  ;
                    SourceExpr="Sell-to Contact Fax No." }
    
        { 1101100004;2;Field  ;
                    SourceExpr="Sell-to Contact E-Mail" }
    
        { 1060004;2;Field     ;
                    SourceExpr="Sell-to Contact Role" }
    
        { 198 ;2   ;Field     ;
                    SourceExpr="No. of Archived Versions";
                    Importance=Additional }
    
        { 12  ;2   ;Field     ;
                    SourceExpr="Posting Date" }
    
        { 14  ;2   ;Field     ;
                    SourceExpr="Order Date";
                    Importance=Promoted }
    
        { 45  ;2   ;Field     ;
                    SourceExpr="Document Date" }
    
        { 135 ;2   ;Field     ;
                    SourceExpr="Requested Delivery Date" }
    
        { 137 ;2   ;Field     ;
                    SourceExpr="Promised Delivery Date";
                    Importance=Additional }
    
        { 243 ;2   ;Field     ;
                    SourceExpr="Quote No.";
                    Importance=Additional }
    
        { 155 ;2   ;Field     ;
                    SourceExpr="External Document No.";
                    Importance=Promoted }
    
        { 10  ;2   ;Field     ;
                    SourceExpr="Salesperson Code";
                    OnValidate=BEGIN
                                 SalespersonCodeOnAfterValidate;
                               END;
                                }
    
        { 1148;2   ;Field     ;
                    SourceExpr="Campaign No.";
                    Importance=Additional }
    
        { 245 ;2   ;Field     ;
                    SourceExpr="Opportunity No.";
                    Importance=Additional }
    
        { 124 ;2   ;Field     ;
                    SourceExpr="Responsibility Center";
                    Importance=Additional }
    
        { 241 ;2   ;Field     ;
                    SourceExpr="Assigned User ID";
                    Importance=Additional }
    
        { 129 ;2   ;Field     ;
                    SourceExpr=Status;
                    Importance=Promoted }
    
        { 58  ;1   ;Part      ;
                    Name=SalesLines;
                    SubFormLink=Document No.=FIELD(No.);
                    PagePartID=Page46 }
    
        { 1905885101;1;Group  ;
                    CaptionML=[DAN=Fakturering;
                               ENU=Invoicing] }
    
        { 16  ;2   ;Field     ;
                    SourceExpr="Bill-to Customer No.";
                    Importance=Promoted;
                    OnValidate=BEGIN
                                 BilltoCustomerNoOnAfterValidat;
                               END;
                                }
    
        { 159 ;2   ;Field     ;
                    SourceExpr="Bill-to Contact No.";
                    Importance=Additional }
    
        { 18  ;2   ;Field     ;
                    SourceExpr="Bill-to Name" }
    
        { 20  ;2   ;Field     ;
                    SourceExpr="Bill-to Address";
                    Importance=Additional }
    
        { 22  ;2   ;Field     ;
                    SourceExpr="Bill-to Address 2";
                    Importance=Additional }
    
        { 89  ;2   ;Field     ;
                    SourceExpr="Bill-to Post Code";
                    Importance=Additional }
    
        { 24  ;2   ;Field     ;
                    SourceExpr="Bill-to City" }
    
        { 26  ;2   ;Field     ;
                    SourceExpr="Bill-to Contact";
                    Importance=Additional }
    
        { 1060000;2;Field     ;
                    SourceExpr="EAN No." }
    
        { 1600002;2;Field     ;
                    SourceExpr="Account Code";
                    OnValidate=BEGIN
                                 AccountCodeOnAfterValidate;
                               END;
                                }
    
        { 84  ;2   ;Field     ;
                    SourceExpr="Shortcut Dimension 1 Code";
                    OnValidate=BEGIN
                                 ShortcutDimension1CodeOnAfterV;
                               END;
                                }
    
        { 92  ;2   ;Field     ;
                    SourceExpr="Shortcut Dimension 2 Code";
                    OnValidate=BEGIN
                                 ShortcutDimension2CodeOnAfterV;
                               END;
                                }
    
        { 28  ;2   ;Field     ;
                    SourceExpr="Payment Terms Code";
                    Importance=Promoted }
    
        { 30  ;2   ;Field     ;
                    SourceExpr="Due Date";
                    Importance=Promoted }
    
        { 32  ;2   ;Field     ;
                    SourceExpr="Payment Discount %" }
    
        { 34  ;2   ;Field     ;
                    SourceExpr="Pmt. Discount Date" }
    
        { 105 ;2   ;Field     ;
                    SourceExpr="Payment Method Code" }
    
        { 1060002;2;Field     ;
                    SourceExpr="Payment Channel" }
    
        { 131 ;2   ;Field     ;
                    SourceExpr="Prices Including VAT";
                    OnValidate=BEGIN
                                 PricesIncludingVATOnAfterValid;
                               END;
                                }
    
        { 221 ;2   ;Field     ;
                    SourceExpr="VAT Bus. Posting Group" }
    
        { 247 ;2   ;Field     ;
                    SourceExpr="Credit Card No." }
    
        { 253 ;2   ;Field     ;
                    CaptionML=[DAN=Kreditkortnummer (sidste fire cifre);
                               ENU=Cr. Card Number (Last 4 Digits)];
                    SourceExpr=GetCreditcardNumber }
    
        { 1906801201;1;Group  ;
                    CaptionML=[DAN=Levering;
                               ENU=Shipping] }
    
        { 36  ;2   ;Field     ;
                    SourceExpr="Ship-to Code";
                    Importance=Promoted }
    
        { 38  ;2   ;Field     ;
                    SourceExpr="Ship-to Name" }
    
        { 40  ;2   ;Field     ;
                    SourceExpr="Ship-to Address";
                    Importance=Additional }
    
        { 42  ;2   ;Field     ;
                    SourceExpr="Ship-to Address 2";
                    Importance=Additional }
    
        { 97  ;2   ;Field     ;
                    SourceExpr="Ship-to Post Code";
                    Importance=Promoted }
    
        { 44  ;2   ;Field     ;
                    SourceExpr="Ship-to City" }
    
        { 46  ;2   ;Field     ;
                    SourceExpr="Ship-to Contact";
                    Importance=Additional }
    
        { 94  ;2   ;Field     ;
                    SourceExpr="Location Code" }
    
        { 141 ;2   ;Field     ;
                    SourceExpr="Outbound Whse. Handling Time";
                    Importance=Additional }
    
        { 48  ;2   ;Field     ;
                    SourceExpr="Shipment Method Code" }
    
        { 107 ;2   ;Field     ;
                    SourceExpr="Shipping Agent Code";
                    Importance=Additional }
    
        { 139 ;2   ;Field     ;
                    SourceExpr="Shipping Agent Service Code";
                    Importance=Additional }
    
        { 143 ;2   ;Field     ;
                    SourceExpr="Shipping Time" }
    
        { 145 ;2   ;Field     ;
                    SourceExpr="Late Order Shipping";
                    Importance=Additional }
    
        { 109 ;2   ;Field     ;
                    SourceExpr="Package Tracking No.";
                    Importance=Additional }
    
        { 50  ;2   ;Field     ;
                    SourceExpr="Shipment Date";
                    Importance=Promoted }
    
        { 119 ;2   ;Field     ;
                    SourceExpr="Shipping Advice";
                    Importance=Promoted }
    
        { 1907468901;1;Group  ;
                    CaptionML=[DAN=Udenrigshandel;
                               ENU=Foreign Trade] }
    
        { 111 ;2   ;Field     ;
                    SourceExpr="Currency Code";
                    Importance=Promoted;
                    OnValidate=BEGIN
                                 CurrencyCodeOnAfterValidate;
                               END;
    
                    OnAssistEdit=BEGIN
                                   CLEAR(ChangeExchangeRate);
                                   ChangeExchangeRate.SetParameter("Currency Code","Currency Factor","Posting Date");
                                   IF ChangeExchangeRate.RUNMODAL = ACTION::OK THEN BEGIN
                                     VALIDATE("Currency Factor",ChangeExchangeRate.GetParameter);
                                     CurrPage.UPDATE;
                                   END;
                                   CLEAR(ChangeExchangeRate);
                                 END;
                                  }
    
        { 52  ;2   ;Field     ;
                    SourceExpr="EU 3-Party Trade" }
    
        { 54  ;2   ;Field     ;
                    SourceExpr="Transaction Type" }
    
        { 1903622801;1;Group  ;
                    CaptionML=[DAN=E-handel;
                               ENU=E - Commerce] }
    
        { 188 ;2   ;Field     ;
                    SourceExpr="BizTalk Sales Order";
                    Editable=FALSE }
    
        { 184 ;2   ;Field     ;
                    SourceExpr="Date Received";
                    Editable=FALSE }
    
        { 180 ;2   ;Field     ;
                    SourceExpr="Time Received";
                    Editable=FALSE }
    
        { 190 ;2   ;Field     ;
                    SourceExpr="BizTalk Sales Order Cnfmn.";
                    Editable=FALSE }
    
        { 186 ;2   ;Field     ;
                    SourceExpr="Date Sent";
                    Editable=FALSE }
    
        { 182 ;2   ;Field     ;
                    SourceExpr="Time Sent";
                    Editable=FALSE }
    
        { 178 ;2   ;Field     ;
                    SourceExpr="Customer Order No." }
    
        { 1900201301;1;Group  ;
                    CaptionML=[DAN=Forudbetaling;
                               ENU=Prepayment] }
    
        { 228 ;2   ;Field     ;
                    SourceExpr="Prepayment %";
                    Importance=Promoted;
                    OnValidate=BEGIN
                                 Prepayment37OnAfterValidate;
                               END;
                                }
    
        { 229 ;2   ;Field     ;
                    SourceExpr="Compress Prepayment" }
    
        { 162 ;2   ;Field     ;
                    SourceExpr="Prepmt. Payment Terms Code" }
    
        { 239 ;2   ;Field     ;
                    SourceExpr="Prepayment Due Date";
                    Importance=Promoted }
    
        { 164 ;2   ;Field     ;
                    SourceExpr="Prepmt. Payment Discount %" }
    
        { 70  ;2   ;Field     ;
                    SourceExpr="Prepmt. Pmt. Discount Date" }
    
        { 1900000007;0;Container;
                    ContainerType=FactBoxArea }
    
        { 1903720907;1;Part   ;
                    SubFormLink=No.=FIELD(Sell-to Customer No.);
                    PagePartID=Page9080;
                    Visible=TRUE;
                    PartType=Page }
    
        { 1902018507;1;Part   ;
                    SubFormLink=No.=FIELD(Bill-to Customer No.);
                    PagePartID=Page9082;
                    Visible=FALSE;
                    PartType=Page }
    
        { 1900316107;1;Part   ;
                    SubFormLink=No.=FIELD(Sell-to Customer No.);
                    PagePartID=Page9084;
                    Visible=FALSE;
                    PartType=Page }
    
        { 1906127307;1;Part   ;
                    SubFormLink=Document Type=FIELD(Document Type),
                                Document No.=FIELD(Document No.),
                                Line No.=FIELD(Line No.);
                    PagePartID=Page9087;
                    ProviderID=58;
                    Visible=TRUE;
                    PartType=Page }
    
        { 1901314507;1;Part   ;
                    SubFormLink=No.=FIELD(No.);
                    PagePartID=Page9089;
                    ProviderID=58;
                    Visible=FALSE;
                    PartType=Page }
    
        { 1906354007;1;Part   ;
                    SubFormLink=Table ID=CONST(36),
                                Document Type=FIELD(Document Type),
                                Document No.=FIELD(No.),
                                Status=CONST(Open);
                    PagePartID=Page9092;
                    Visible=FALSE;
                    PartType=Page }
    
        { 1907012907;1;Part   ;
                    SubFormLink=No.=FIELD(No.);
                    PagePartID=Page9108;
                    ProviderID=58;
                    Visible=FALSE;
                    PartType=Page }
    
        { 1901796907;1;Part   ;
                    SubFormLink=No.=FIELD(No.);
                    PagePartID=Page9109;
                    ProviderID=58;
                    Visible=FALSE;
                    PartType=Page }
    
        { 1907234507;1;Part   ;
                    SubFormLink=No.=FIELD(Bill-to Customer No.);
                    PagePartID=Page9081;
                    Visible=FALSE;
                    PartType=Page }
    
        { 1900383207;1;Part   ;
                    Visible=FALSE;
                    PartType=System;
                    SystemPartID=RecordLinks }
    
        { 1905767507;1;Part   ;
                    Visible=TRUE;
                    PartType=System;
                    SystemPartID=Notes }
    
      }
      CODE
      {
        VAR
          Text000@1000 : TextConst 'DAN=Denne funktion kan ikke udf›res i view only-tilstand.;ENU=Unable to execute this function while in view only mode.';
          CopySalesDoc@1001 : Report 292;
          MoveNegSalesLines@1007 : Report 6699;
          ApprovalMgt@1012 : Codeunit 439;
          ReportPrint@1002 : Codeunit 228;
          DocPrint@1003 : Codeunit 229;
          ArchiveManagement@1008 : Codeunit 5063;
          SalesInfoPaneMgt@1009 : Codeunit 7171;
          SalesSetup@1004 : Record 311;
          ChangeExchangeRate@1005 : Form 511;
          UserMgt@1006 : Codeunit 5700;
          Usage@1010 : 'Order Confirmation,Work Order';
          Text001@1011 : TextConst 'DAN=Der er ikke-bogf›rte forudbetalingsbel›b p† %1 %2.;ENU=There are non posted Prepayment Amounts on %1 %2.';
          Text002@1013 : TextConst 'DAN=Der er ubetalte forudbetalingsfakturaer, der er knyttet til %1 %2.;ENU=There are unpaid Prepayment Invoices related to %1 %2.';
          SalesHistoryBtnVisible@19034839 : Boolean INDATASET;
          BillToCommentPictVisible@19001287 : Boolean INDATASET;
          BillToCommentBtnVisible@19078935 : Boolean INDATASET;
          SalesHistoryStnVisible@19031688 : Boolean INDATASET;
    
        PROCEDURE UpdateAllowed@1() : Boolean;
        BEGIN
          IF CurrPage.EDITABLE = FALSE THEN
            ERROR(Text000);
          EXIT(TRUE);
        END;
    
        LOCAL PROCEDURE UpdateInfoPanel@2();
        VAR
          DifferSellToBillTo@1000 : Boolean;
        BEGIN
          DifferSellToBillTo := "Sell-to Customer No." <> "Bill-to Customer No.";
          SalesHistoryBtnVisible := DifferSellToBillTo;
          BillToCommentPictVisible := DifferSellToBillTo;
          BillToCommentBtnVisible := DifferSellToBillTo;
          SalesHistoryStnVisible := SalesInfoPaneMgt.DocExist(Rec,"Sell-to Customer No.");
          IF DifferSellToBillTo THEN
            SalesHistoryBtnVisible := SalesInfoPaneMgt.DocExist(Rec,"Bill-to Customer No.")
        END;
    
        LOCAL PROCEDURE ApproveCalcInvDisc@3();
        BEGIN
          CurrPage.SalesLines.FORM.ApproveCalcInvDisc;
        END;
    
        LOCAL PROCEDURE SelltoCustomerNoOnAfterValidat@19034782();
        BEGIN
          CurrPage.UPDATE;
        END;
    
        LOCAL PROCEDURE SalespersonCodeOnAfterValidate@19011896();
        BEGIN
          CurrPage.SalesLines.FORM.UpdateForm(TRUE);
        END;
    
        LOCAL PROCEDURE BilltoCustomerNoOnAfterValidat@19044114();
        BEGIN
          CurrPage.UPDATE;
        END;
    
        LOCAL PROCEDURE ShortcutDimension1CodeOnAfterV@19029405();
        BEGIN
          CurrPage.SalesLines.FORM.UpdateForm(TRUE);
        END;
    
        LOCAL PROCEDURE ShortcutDimension2CodeOnAfterV@19008725();
        BEGIN
          CurrPage.SalesLines.FORM.UpdateForm(TRUE);
        END;
    
        LOCAL PROCEDURE PricesIncludingVATOnAfterValid@19009096();
        BEGIN
          CurrPage.UPDATE;
        END;
    
        LOCAL PROCEDURE AccountCodeOnAfterValidate@19007267();
        BEGIN
          CurrPage.SalesLines.FORM.UpdateForm(TRUE)
        END;
    
        LOCAL PROCEDURE CurrencyCodeOnAfterValidate@19068298();
        BEGIN
          CurrPage.SalesLines.FORM.UpdateForm(TRUE);
        END;
    
        LOCAL PROCEDURE Prepayment37OnAfterValidate@19040510();
        BEGIN
          CurrPage.UPDATE;
        END;
    
        BEGIN
        END.
      }
    }
    
    
    

    /Anders
  • yukonyukon Member Posts: 361
    Hi Andersaa,

    After import your page into my db, it's ok for me. i can see Sales Line Method. I don't know what happen on your PC. Please try this way,
    Remove ws from your project and delete link from appconfig or webconfig. After that add ref. again.

    Noted: i tested on NAV R2 B302012. I created new page for sales header and sales line. I face error when i used one page. That's why i decide to use separate page.




    Best Regards,
    Yukon
    Make Simple & Easy
  • AndersaaAndersaa Member Posts: 15
    Unfortunately still no changes.
    Is the page42 dependent of any other object ?

    I am not shure of what you meen by your note with 2 seperate pages.
    I'm running r2 build 32012.

    /Anders
Sign In or Register to comment.