Better way to create item journal entries

slmaluwa
Member Posts: 366
Hi
I have to create around 500,000 lines of Item Journal Entries through code using a process only report.
My current plan is to have a separate function inside the report to open the journal line table, write the singly entry with calling EVALUATE, INSERT and then close it. This function could be called from OnAfterGetRecord of the report.
Or, I can open the line table in PreDateItem and write the lines directly inside OnAfterGetRecord. In this way, i feel that the table will be locked for a long time. Is my opinion is correct? or, is there a better way to do this?
(The data is already exists in a customer table in the same database).
I have to create around 500,000 lines of Item Journal Entries through code using a process only report.
My current plan is to have a separate function inside the report to open the journal line table, write the singly entry with calling EVALUATE, INSERT and then close it. This function could be called from OnAfterGetRecord of the report.
Or, I can open the line table in PreDateItem and write the lines directly inside OnAfterGetRecord. In this way, i feel that the table will be locked for a long time. Is my opinion is correct? or, is there a better way to do this?
(The data is already exists in a customer table in the same database).
"A bove maiore discit arare minor"-"From the old ox, the young one learns to plow."
0
Comments
-
slmaluwa wrote:Hi
I have to create around 500,000 lines of Item Journal Entries through code using a process only report. ...
Why?David Singleton0 -
rhpnt wrote:Good one David!slmaluwa wrote:I have to create around 500,000 lines of Item Journal Entries through code using a process only report. (The data is already exists in a customer table in the same database).
Rotten lemon
This was a special request for an Indian client. based on past 4 years transaction, they are passing positive/negative entries (dunno why). The previous person has create a table with all basic data like Item No, location, +/- and quantity.
I already done this using the method i mention above. But, used a COMMIT after creating each entry and updating a boolean field in source table. So, the user can stop the process anytime and resume later.
By the time I type this line, 50% of the work is done. Posting the actual line is going to be a nightmare for them and beyond my domain."A bove maiore discit arare minor"-"From the old ox, the young one learns to plow."0 -
nevermind, didn't read it correctly0
-
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