Interaction between two databases.

smartkoshak
Member Posts: 3
Hi there! I'm new to NAV and hope to get some piece of advice from you. My issue is the following.
I need to implement interaction between two NAVs.
Let's say we have DataBase1 (DB1) and DataBase2 (DB2).
At DB2 I have a SOAP web-service based on a codeunit.
I send HTTP POST request from DB1 which contains Sales Order Header and Sales Order Lines data as a Json.
I need to get this data at DB2 and handle it (create the corresponding records).
How can I do that?
I need to implement interaction between two NAVs.
Let's say we have DataBase1 (DB1) and DataBase2 (DB2).
At DB2 I have a SOAP web-service based on a codeunit.
I send HTTP POST request from DB1 which contains Sales Order Header and Sales Order Lines data as a Json.
I need to get this data at DB2 and handle it (create the corresponding records).
How can I do that?
0
Best Answer
-
Hi,
First up, you'll need knowledge about the System and the AL language to implement this kind of behaviour.
If you are new to NAV/BC this will get you started:
https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-dev-overview
You will most likely want to use a REST (OData) Service to create the functionality you described. Assuming you know the basics of Webservices, the following link should guide you in the right direction:
https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/webservices/web-services
The newer releases of the AL language have decent features to handle communication via HTTP in order to call your Service. If you want to solve the issue using the "old" language C/AL, you'll have to perform a few more steps, so I recommend creating an AL extension.
/Wisa
Austrian NAV/BC Dev5
Answers
-
Which NAV version?0
-
-
I don't think you can handle JSON with a SOAP web service. SOAP web services only use XML to transfer data. (https://www.w3schools.com/xml/xml_soap.asp)
If you want to use JSON you'll have to check the ODATA web services and the new API system included in BC.
Check if this article helps: https://andreilungu.com/use-rest-web-service-import-to-business-central/0 -
Hi,
First up, you'll need knowledge about the System and the AL language to implement this kind of behaviour.
If you are new to NAV/BC this will get you started:
https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-dev-overview
You will most likely want to use a REST (OData) Service to create the functionality you described. Assuming you know the basics of Webservices, the following link should guide you in the right direction:
https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/webservices/web-services
The newer releases of the AL language have decent features to handle communication via HTTP in order to call your Service. If you want to solve the issue using the "old" language C/AL, you'll have to perform a few more steps, so I recommend creating an AL extension.
/Wisa
Austrian NAV/BC Dev5 -
Thank you for all the replies! The task has been done.0
-
[Topic moved from 'NAV/Navision Classic Client' 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