how to Import json file to navision Table

Rajan123
Member Posts: 39
Hi all,
I am new to Navision,
can anyone of you tell me , how to import json file to Navision ?
thanks,
Rajan.
I am new to Navision,
can anyone of you tell me , how to import json file to Navision ?
thanks,
Rajan.
0
Answers
-
- First of all you'll need to import the file into a stream.
- The stream you can then convert to a textvariable.
- Then in AL you can use Json variables, or in C/AL you need to use DotNet for Json.
- You parse the text variable to a Json Object/Array (check wether the first character in the text string is [)
- From this moment on you have a Json Object/Array. Either you handle the Json object directly. Then use the SelectToken method on the Json Object for every field/element you want to load from Json into Navision and assign it to the correct navision field.
If you have an array, you need to obviously loop through the array and then do the previous steps.
Thats about it, not all too complex.
I'm certain you can find many examples on Mibuso about working with Json or importing a file to Blob.0 -
It is actually quite impossible to give you a good answer because it depends on a lot of things and mostly on your version of Navision (or BC).
Ex. if you are on a newer BC, then the datatypes json will help, if you are on a newere NAV version then the Json Buffer is you friend, if you is on a old NAV (but still RTC) then perhaps json newtonsoft is your friend and lastly if you are on oldere NAV Classic the the code would be complety different.For help, do not use PM, use forum instead, perhaps other people have the same question, or better answers.0 -
thank you so much for your replies.
using json buffer, can we import from external api json file to navision table.
1 -
I am using Nav 2018
0 -
Yes, you will have to retrive the JSON response from the API and load it into the json bufferFor help, do not use PM, use forum instead, perhaps other people have the same question, or better answers.0
-
do you have any sample data for retrieving json file?0
-
Hi @Rajan123 Well without knowing what kind of API you are accessing, I cannot provide any thing useful, try have a look at Eric Hougaards' youtube https://www.youtube.com/c/ErikHougaardFor help, do not use PM, use forum instead, perhaps other people have the same question, or better answers.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