Insert in Sales Line

deepbluedeepblue Member Posts: 152
Hello,

I'm trying to insert lines in Sales Line table, I want to fill some fields like: "Document Type","Sell-to Customer No.","Document No.","Type",...
but I want the system automaticlly fill the "Line No." like in "Sales Quote" form. Has anyone any solution?

thank you!

Comments

  • matteo_montanarimatteo_montanari Member Posts: 189
    deepblue wrote:
    Hello,

    I'm trying to insert lines in Sales Line table, I want to fill some fields like: "Document Type","Sell-to Customer No.","Document No.","Type",...
    but I want the system automaticlly fill the "Line No." like in "Sales Quote" form. Has anyone any solution?

    thank you!

    No, i'm sorry
    You must fill "Line No." manually. example:

    Salesline.SETRANGE("Document Type", SalesHeader."Document Type");
    Salesline.SETRANGE("Document No.", SalesHeader."No.");
    IF Salesline.FIND('+') THEN
    LastLIneNo := SalesLine."Line No."
    ELSE
    LastLIneNo := 0;

    ...

    SalesLine."Line No." := LastLIneNo + 10000;

    Matteo
    Reno Sistemi Navision Developer
  • krikikriki Member, Moderator Posts: 9,120
    Filling up "Line No." automatically is a form-property, so you can't use it in code.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.