Announcements
No record found.
Hi,
How do I create a JSON file thru C/AL Code in NAV 2016 Database ?
Kindly inform.
Thanks,
Subrata
You Need to use .net for this as in NAV we can Consume Jason but to write we need to use .net.
You need to use Odata.
You can download Latest CU of Indian version which has export JSON inbuilt on Posted Sales Invoice or to push your data in web service you can use this URL docs.microsoft.com/.../how-to--use-odata-to-return-obtain-a-json-document
From 13R2 systems have newtonsoft dll inbuilt so call dotnet variables of that.
5025.JsonFile.txt
Sample File :
{
"DocumentNo": "101009",
"Address": {
"Address1": "Slovenska ccsta 127",
"City": "MEMA Ljubljana d.o.o."
},
"ItemDetails": [
"ItemNo": "1976-W",
"PrName": "INNSBRUCK Storage Unit/W.Door"
"ItemNo": "1964-W",
"PrName": "INNSBRUCK Storage Unit/G.Door"
}
]
//Code to Create File in attachment
Use the JSON Management codeunit.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Stars!
We are thrilled to have these Champions in our Community!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
OussamaSabbouh 1,922 Super User 2026 Season 1
YUN ZHU 1,078 Super User 2026 Season 1
Khushbu Rajvi. 628 Super User 2026 Season 1