get data from table

axBobSE
Member Posts: 17
I got a small problem I cant seem to get this to work
if I just type in the number its no problem both fields are of the same type code tried to do it in different ways but it wont do as I want it to
if I write global_debitor.GET("Kundenr."); as I thourth first would work since they are both type <Code> I get a error message saying it cant find Nummer "" on Debitor (the table subtype of global_debitor)
also tried.
global_debitor.INIT;
global_debitor.SETRANGE(Nummer,"Kundenr.");
(but I think I miss something here to select it?)
bom_Salgsfakturahoved - OnPreDataItem() InvoiceNum := 'F1000000'; //global variable set to invoiceNum (change to dynamic) SETRANGE("Nummer",InvoiceNum); //range on this dataItem IF (EVALUATE(globalInt,"Kundenr.")) THEN BEGIN global_debitor.GET(globalInt); END //global_debitor.GET('5173');
if I just type in the number its no problem both fields are of the same type code tried to do it in different ways but it wont do as I want it to

if I write global_debitor.GET("Kundenr."); as I thourth first would work since they are both type <Code> I get a error message saying it cant find Nummer "" on Debitor (the table subtype of global_debitor)
also tried.
global_debitor.INIT;
global_debitor.SETRANGE(Nummer,"Kundenr.");
(but I think I miss something here to select it?)
0
Answers
-
Hi Bob,
global_debitor.GET("Kundenr.");
is the way to go. What you're missing is a find('-') on the default table - I assume this is a report and it will only get the records in the onaftergetrecord trigger.
Not sure what you are tring to achieve?0 -
:^o Oh yes ofc it woudnt be able to use the "kundern." untill in the (omAfterGetRecord)Not sure what you are tring to achieve?
The report and file start off with some data depending on the Salgsfakturahoved (CustInvoiceJour) and data from the Debitor table (CustTable) and then under it there will be all the lines on Salgsfakturalinie (CustInvoiceTrans) that refer to the Salgsfakturahoved with a surten "Bilagsnr." (InvoiceId) - Hope that made any sence, we have a customer that wants to recive these kind of invoices from us so they can read them into what ever program/database it is they use.
The names in () is what they are called in Axapta my Navision got all danish named tables can be a bit anoying when working with it.
Thanks again. DaveT0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K 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
- 320 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