Insert sales Header and Lines from sql database

badugan
Member Posts: 6
Hi, I am a SQL developer and I am tasked with inserting Sales Header and Lines from a SQL database into Navision 2017. It's an in house database that records staff orders on a different server that then needs to be bought into Navision as Sales Header and Lines..
This custom database is written in c# .net
How do I go about this please? Is there any step by step guide that I could follow?
Any help would be appreciated.
Navision 2017 and SQL Server 2016
Harry
This custom database is written in c# .net
How do I go about this please? Is there any step by step guide that I could follow?
Any help would be appreciated.
Navision 2017 and SQL Server 2016
Harry
0
Answers
-
The recommend way to insert data is through rapid start services. I don't think is there any guide to do it through SQL at least an official one.0
-
Never do something like that. I mean it. It's bad.
You'll bypass all of the business logic and may end up shredding those tables. The correct way to do it (if rapid start isn't an option) is writing to a buffer table and let NAV populate the desired tables itself via job queue reading that buffer table.0 -
Thanks for the replies. I understand it's not wise to write directly to NAV via SQL.. hence the question here. What about using web services.. is there some tutorial that I can learn from.. can't seem to find anything informative that I can follow.. using an exposed Sales Order Web Service (SOAP) and a c# .NET app to be able to create those sales orders. All the related data for Sales order is held in custom database.. how can I use SOAP to trigger inserting a NAV Sales Order with that data.. any idea or pointers will be appreciated.0
-
Alternatively, is there any tutorial that I could use for Rapid Start Services? If it is any different from Web services0
-
I wont say it would be a custom table but Sales Header and Line is something which is the core standard tables and you should never insertion from SQl Side.
How will you calculate those fields which NAV automatically does on OnValidate??
Many Business Process wont be executed if you do it from SQL!!Thanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/0 -
Thanks for the comment @RockWithNAV .. hence my question here. I was really hoping for a tutorial on using SOAP services in NAV and how to insert an Order from a .NET app. I have customer details and order details.. just need to trigger an order creation using SOAP from another app.0
-
@badugan
Yes this will be the correct way of doing this. You will get many tutorials on this as how to expose NAV service and consume web Service.
In your write the code in a Codeunit and expose it as web-service, check out the parameters as you will have to receive XmlPort as parameter where you have header and line information's!!Thanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/0 -
@RockWithNAV thank you.. are you able to give me links to these tutorials please? I can't seem to find that I can really use.. I'm only at a beginner / intermediate level. Thank you0
-
[Topic moved from 'Dynamics CRM' forum to 'NAV Three Tier' forum]
Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!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