Sales Invoice
Lorneagle
Member Posts: 6
Hi everybody
I'm new to Navision and i have a problem accessing a Sales Invoice.
I created a button in Form 43 Sales Invoice:
SalesInvoiceHeader is a global variable of type Record and Subtype Sales Invoice Header
But if i open an invoice and push the button, Navision tells me that there is no "Sales Invoice Header.No" equal to the No. of the invoice i just opened.
Isn' t the "Sales Invoice Header" record the right place to reference an existing invoice?
And how can i access the Data in the Sales Invoice Line of an Sales Invoice.
I am so confused
Thanks in advance for answers
I'm new to Navision and i have a problem accessing a Sales Invoice.
I created a button in Form 43 Sales Invoice:
Send - OnPush()
SalesInvoiceHeader.INIT;
SalesInvoiceHeader."No." := "No.";
SalesInvoiceHeader.FIND('=');
SalesInvoiceHeader is a global variable of type Record and Subtype Sales Invoice Header
But if i open an invoice and push the button, Navision tells me that there is no "Sales Invoice Header.No" equal to the No. of the invoice i just opened.
Isn' t the "Sales Invoice Header" record the right place to reference an existing invoice?
And how can i access the Data in the Sales Invoice Line of an Sales Invoice.
I am so confused
Thanks in advance for answers
0
Comments
-
Firstly, what are you actually trying to do. Although you are using the wrong records, even if done right, this really is the wrong way to do what ever it is you are trying to do.
The technical issue, is that there is a difference between a Posted Sales Invoice and a Sales Invoice. A sales invoice is Table 36, a Posted Sales invoice is table 112.David Singleton0 -
Indeed,
first tell us what you are trying to do...
Second,
You could replace your code with:SalesInvoiceHeader.GET("No.");And then do your thing that you want to do... .
To access the data of Sales Invoice Line, here is some code:SalesInvoiceLine.SETRANGE("Document No.", "No."); IF SalesInvoiceLine.FIND('-') THEN REPAT <Do your thing> UNTIL SalesInvoiceLine.NEXT = 0;
But again,
try to explain on what you are trying to do, then we can tell you what might be the best way to do it ...0 -
First of all thx for the input how to access the subform

What i want ( or try) to do:
I want to export an invoice to an XML-File and send a message to a MSMQ.
So i planed to pass the invoice record to a codeunit which sends the MSMQ message and calls XMLPort (or something similar) to export the record.
But i already fail trying to pass the invoice record that i am working on to another codeunit ^^0
Categories
- All Categories
- 75 General
- 75 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
- 611 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions

