Distribute table with codeunit

larshs
Member Posts: 17
Hi,
I have a codeunit webservice for exporting products. Instead of exporting the entire item table in one batch, I'd like to split it up into smaller batches, and then have the consumer party request the web service continuously. I'm using a custom table to keep track of, how many records have been exported, so I would like that table to be distributed with the code unit, but I haven't found any way of doing that.
Perhaps my approach with the table is not the best? Any advice would be much appreciated.
BR.
Lars
I have a codeunit webservice for exporting products. Instead of exporting the entire item table in one batch, I'd like to split it up into smaller batches, and then have the consumer party request the web service continuously. I'm using a custom table to keep track of, how many records have been exported, so I would like that table to be distributed with the code unit, but I haven't found any way of doing that.
Perhaps my approach with the table is not the best? Any advice would be much appreciated.
BR.
Lars
0
Answers
-
I would leave it up to the consumer of the webservice to keep track of how many records was exported.
If you are exporting the table in "primary key" order, then add a parameter in your webservice, allowing the consumer of the webservice to send info about the last received products primary key value. Use that info to find the next record(s), and send the record(s).0 -
Hi,
Sorry, I've had problems logging in.
That's a good suggestion, but that's not an option in this scenario, as the consumer system is not able to pass parameters in the request to the webservice. That's why I need to keep track of the progress in NAV.
BR.
Lars0 -
No, they are only able to pass requests untill a certain condition is met. So NAV has to keep track of, how many items have been exported.0
-
Is it possible to distribute a table alongside with a code unit? It's not an architectual question because the architecture is provided by the consumer.
BR.
Lars0
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