[RESOLVED] TableData 0 does not exist

ccbryan63
Member Posts: 115
Hi, wie gehts, ciao, ca va, que pasa, ni hao ma.
I am in the process of converting a 4.0 service pack 3 DB to 5.0. I have been replicating modifications to a clean 5.0 database and I'm encountering this error when trying to compile Form 42 Sales Order in 5.0.
My 5.0 database is in native Navision (non-SQL). I am using our developer license, and there are no database logins set up.
The error message is "TableData 0 does not exist" and it shows the error to be in the following custom function, at the CALCFIELDS line:
DetermineCCStatus()
//Add credit card messaging
CALCFIELDS("Invoice Discount Amount");
IF ("Amount Submitted" <> 0) OR
("Amount Approved" <> 0) OR
("Amount Authorized" <> 0) THEN
BEGIN
CurrForm.CCMsg1.VISIBLE := TRUE;
CurrForm.CCMsg3.VISIBLE := TRUE;
//CurrForm.CCMsg5.VISIBLE := TRUE;
CurrForm.CCMsg7.VISIBLE := TRUE;
//check Amount since the Amount Including VAT does not calc until Release
....
The DetermineCCStatus() function is called from
Form - OnAfterGetRecord()
SETRANGE("Document Type");
//include message if credit card info exists
DetermineCCStatus;
Invoice Discount Amount is a custom field in the Sales Header Table. It is a flowfield that sums "Sales Line"."Inv. Discount Amount." I have verified that these fields are present in their respective tables and that those tables compile correctly. I have verified that Sales Header is the base table of the Sales Order Form.
What is this error trying to tell me?
Thanks in advance for your attention.
Chandler
I am in the process of converting a 4.0 service pack 3 DB to 5.0. I have been replicating modifications to a clean 5.0 database and I'm encountering this error when trying to compile Form 42 Sales Order in 5.0.
My 5.0 database is in native Navision (non-SQL). I am using our developer license, and there are no database logins set up.
The error message is "TableData 0 does not exist" and it shows the error to be in the following custom function, at the CALCFIELDS line:
DetermineCCStatus()
//Add credit card messaging
CALCFIELDS("Invoice Discount Amount");
IF ("Amount Submitted" <> 0) OR
("Amount Approved" <> 0) OR
("Amount Authorized" <> 0) THEN
BEGIN
CurrForm.CCMsg1.VISIBLE := TRUE;
CurrForm.CCMsg3.VISIBLE := TRUE;
//CurrForm.CCMsg5.VISIBLE := TRUE;
CurrForm.CCMsg7.VISIBLE := TRUE;
//check Amount since the Amount Including VAT does not calc until Release
....
The DetermineCCStatus() function is called from
Form - OnAfterGetRecord()
SETRANGE("Document Type");
//include message if credit card info exists
DetermineCCStatus;
Invoice Discount Amount is a custom field in the Sales Header Table. It is a flowfield that sums "Sales Line"."Inv. Discount Amount." I have verified that these fields are present in their respective tables and that those tables compile correctly. I have verified that Sales Header is the base table of the Sales Order Form.
What is this error trying to tell me?
Thanks in advance for your attention.
Chandler
0
Comments
-
One reason why this error prompt is because there is a variable that has no table specified on it. Try using your debugger it will help you a lot.No future at CPI0
-
Check the local variables of the function for the record type variable without sub-type as easabangan wrote.0
-
Bingo! Right first time. Thank you gentlemen.
Chandler0
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