Notifications
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
OussamaSabbouh 2,066
YUN ZHU 658 Super User 2025 Season 2
Sumit Singh 595