How to post FA G/L Jnl got data from csv file from dataport?

Aravindh_Navision
Member Posts: 258
Hi Friends,
I have designed a dataport to transfer the data from csv file to Gen. Journal Line table. The data are transferring correctly. But when I tried to post from FA G/L Journal form, I am not able to post it.
I am getting an error that "Document No. XXX is out of balance due to additional reporting currency. please check that FA Add. - Currency Factor is correct for each line.". Also, it is shows that the Amount field and Amount LCY fields are not validated. I have done the below lines of code.
Gen. Journal Line - OnAfterImportRecord()
Can anyone tell me, where I am going wrong?
Thanks,
Aravindh
I have designed a dataport to transfer the data from csv file to Gen. Journal Line table. The data are transferring correctly. But when I tried to post from FA G/L Journal form, I am not able to post it.
I am getting an error that "Document No. XXX is out of balance due to additional reporting currency. please check that FA Add. - Currency Factor is correct for each line.". Also, it is shows that the Amount field and Amount LCY fields are not validated. I have done the below lines of code.
Gen. Journal Line - OnAfterImportRecord()
VALIDATE("Journal Template Name", 'ASSETS'); VALIDATE("Journal Batch Name", 'FIXED ASS'); VALIDATE("Line No.", "Line No."); VALIDATE("Posting Date", "Posting Date"); VALIDATE("Source Code", 'FAGLJNL'); VALIDATE("Depreciation Book Code","Depreciation Book Code"); VALIDATE("Account Type","Account Type"); VALIDATE("Account No.", FANo); VALIDATE(Amount, Amount); VALIDATE("Amount (LCY)","Amount (LCY)"); VALIDATE("Shortcut Dimension 1 Code","Shortcut Dimension 1 Code");
Can anyone tell me, where I am going wrong?
Thanks,
Aravindh
0
Comments
-
When you goto View-> Dataport fields are you importing diretly into the table fields or are you importing into Global variables?
If fields is the CallFieldValidate checked?
I prefer importing into variables for better control and having the ability to validate in the order I want.
ie/ImportedAmount
So you're Dataport fields would be your variable name's not the direct table field names.
then OnafterImport you can use your code..
VALIDATE(Amount, ImportedAmount); //then you can validate from the variable to the main field.0
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