Newbie dataport problem
Comments
-
how to import data from excel or access in navision?
pliz help
thanx [-o<0 -
Hi Stanley,
You can import data through a dataport. Search here in the forum on dataport and you will find lots of information. Thats how I started too.
Good luck!0 -
Ilona,
I guess today is the day?
I just want to clarify where I meant for you to go to "delete" no series. The first thing to consider is that you have system set-up and you have journal set-up.
System set-up would be your no. series definitions themselves. It starts with XXXX and ends with ZZZZ and the last used was XXXY and manual numbers are allowed (Y/N), etc.
Journal Set-up is where you can specify which no. series you intend to use per Journal Batch. When you go to your job journal and select the journal batch name, you should be presented with a form showing available journal batches. here you should see columns for no. series and posting no. series (show/hide as needed). When you leave these fields blank, the user controls what the doc no will be on entry AND on posting.
I have double checked where i have seen this before, and confirmed this does work. I have imported to item journal to load initial inventory and wrote an import to enter Payroll entries to a General Journal (we don't have the payroll module but the entries must be reflected in the G/L). In both cases, defining the journal batch without a no. series (or a posting no. series) let me push in my imported values.
Here is what I used, data item = integer. Some stuff happens in other triggers mainly for clean-up, etc.[i]..earlier i purged whatever was in this journal to avoid same file from being imported more than once in error[/i] //Now we need to begin creating the journal lines. The first record in the import file will be line 10000. (i omit this logic below) //Subsequent line nos will be incrementally increased by 10000. GenJrnlLine.INIT; GenJrnlLine.VALIDATE("Journal Template Name",'GENERAL'); GenJrnlLine.VALIDATE("Journal Batch Name",'XX'); GenJrnlLine.VALIDATE("Source Code",'GENJNL'); GenJrnlLine."Line No." := TempLineNo; GenJrnlLine.VALIDATE("Posting Date",InPostDate); GenJrnlLine.VALIDATE("Document No.",InDocNo); GenJrnlLine.VALIDATE("Account Type",GenJrnlLine."Account Type"::"G/L Account"); GenJrnlLine.VALIDATE("Account No.",InGLAcct); GenJrnlLine.VALIDATE(Description,InDescription); GenJrnlLine.VALIDATE("Shortcut Dimension 1 Code",InDept); GenJrnlLine.VALIDATE(Amount,InAmount); CLEAR(GenJrnlLine."Gen. Prod. Posting Group"); IF GenJrnlLine.INSERT THEN BEGIN //line created without problem Counter += 1; END ELSE BEGIN MESSAGE('Error creating journal line for %1 %2 %3 %4',InGLAcct,InDept,InDescription,InAmount); END; TempLineNo += 10000;
maybe this helps you?kind of fell into this...0 -
Hi all,
Still it isn't working complete. I already discovered the problem, but cannot solve it.
In Job Journal the lines are displayed the way they should be.
As soon as I press F11, it's complaining about the Dimension Value Code.
The right code for that record is displayed, but when pressing Ctrl+Shift+D , there appaers a table that should be filled. But it isn't. I guess there is a validate problem. ](*,)0 -
Can be corrected by inserting as soon as you have filled the primary key fields. Then the validates on fields that create dimensions will fill out the underlying table.
Oh and try manually typing in the line so you have something to compare agains.0 -
thank you for your quick reply!
When typing that line manually, it works fine.
Uhm, how do I set the primary key in that dataport? :shock:0 -
Just move your insert(true) to right after Journal Template Name,Journal Batch Name,Line No. has been filled out. Then the line is in the database and validates then works as if you typed it in.
The primary key is in the table, and is what keeps every line unique.0 -
:roll: I added the INSERT(True)
I guess the lines are unique now, because I'm getting this error message now:
The Job Journal Line Already exists
Identification Fields and Values:
Journal Template Name='PROJECT', Job Journal Batch Name = 'CHANTALLE', Line No.= 0
Is it a kind of reset problem?0 -
AFTER you insert the line no :-)0
-
OK, AFTER now ;-)
[-o< But now the next error message is appearing:
Qty. per unit of Measure must not be 0 in Job Journal Line Journal Template Name=",Journal Batch Name=",Line No.='0'.
:?0 -
Looks like you are validateing Quantity on an empty line. Use debugger to see what goes wrong. 1 thing is for sure: primary key fields are not filled out, or not inserted.0
-
Well if your line no always starts with 10000 - you know the import is happing wrong.
Another easy way is to set all your fields to Variables and import them in the order you want.
for example
instead of "Account No" you can make a var called AcctNo.
make AcctNo your dataport field and
on import record
"Account No" :=AcctNo;
"Posting Date" := PostDate;
"Source Code" := SourceCode;
next variable
next variable
etc
Bringing them in in the order that they are needed and validating those that need to be validated.
- hang in there - once you finish this all other dataports will seem like a breeze! 0 -
thank you savatage, I'll give it a try and lett you know!
thx for cheering me up
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
