How to insert a 2nd line in the salesline table
mgerhartz
Member Posts: 50
Hi again,
I've created some new invoices through a report. Now I want to change the content of the salesline in that way, that I will have a text on two lines instead of one line. I wrote the following code:
What kind of code do I have to insert to write text in the 2nd line?
Thanks for your help!
I've created some new invoices through a report. Now I want to change the content of the salesline in that way, that I will have a text on two lines instead of one line. I wrote the following code:
SalesLine_Rec.INIT;
SalesLine_Rec."Document Type" := SalesLine_Rec."Document Type"::Invoice;
SalesLine_Rec."Gen. Bus. Posting Group" := Customer_Rec."Gen. Bus. Posting Group";
SalesLine_Rec."Document No." := SalesHeader_Rec."No.";
SalesLine_Rec."Line No." := 10000;
SalesLine_Rec.VALIDATE(Description, BuHaPauschale2005.Beschreibung);
SalesLine_Rec.Type := SalesLine_Rec.Type::"G/L Account";
SalesHeader_Rec.VALIDATE("No.",BuHaPauschale2005.Konto);
//SalesLine_Rec.VALIDATE("No.", FORMAT(1370));
SalesLine_Rec.VALIDATE(Quantity, 1);
SalesLine_Rec.VALIDATE("Unit Price", BuHaPauschale2005.Betrag);
SalesLine_Rec.INSERT;
What kind of code do I have to insert to write text in the 2nd line?
Thanks for your help!
0
Comments
-
// Line 1 CLEAR(SalesLine_Rec); // Clear clears also filters and keyfields SalesLine_Rec."Document Type" := SalesLine_Rec."Document Type"::Invoice; SalesLine_Rec."Document No." := SalesHeader_Rec."No."; SalesLine_Rec."Line No." := 10000; SalesLine_Rec.VALIDATE(Type,SalesLine_Rec.Type::"G/L Account"); SalesLine_Rec.VALIDATE("No.",BuHaPauschale2005.Konto); SalesLine_Rec.VALIDATE(Description, BuHaPauschale2005.Beschreibung); // NO NEED. it is taken from the header SalesLine_Rec."Gen. Bus. Posting Group" := Customer_Rec."Gen. Bus. Posting Group"; SalesLine_Rec.VALIDATE(Quantity, 1); SalesLine_Rec.VALIDATE("Unit Price", BuHaPauschale2005.Betrag); SalesLine_Rec.INSERT(TRUE); // Line 2 SalesLine_Rec.INIT // INIT does NOT clear keyfields SalesLine_Rec."Line No." += 10000; SalesLine_Rec.VALIDATE(Type,SalesLine_Rec.Type::" "); SalesLine_Rec.VALIDATE(Description, BuHaPauschale2005."Beschreibung 2"); SalesLine_Rec.INSERT(TRUE);Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Thanks again, I will check this out.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 328 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions