<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Umut Dogan Koc on Medium]]></title>
        <description><![CDATA[Stories by Umut Dogan Koc on Medium]]></description>
        <link>https://medium.com/@umutdogankoc?source=rss-8b101100a559------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*KrzMM4aV-6RVbx1C.jpg</url>
            <title>Stories by Umut Dogan Koc on Medium</title>
            <link>https://medium.com/@umutdogankoc?source=rss-8b101100a559------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 23:46:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@umutdogankoc/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Introducing Business Central Native API’s]]></title>
            <link>https://umutdogankoc.medium.com/introducing-business-central-native-apis-2c81f80eb4a3?source=rss-8b101100a559------2</link>
            <guid isPermaLink="false">https://medium.com/p/2c81f80eb4a3</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[d365-business-central]]></category>
            <category><![CDATA[business-central]]></category>
            <dc:creator><![CDATA[Umut Dogan Koc]]></dc:creator>
            <pubDate>Mon, 04 Apr 2022 19:13:56 GMT</pubDate>
            <atom:updated>2022-04-04T19:13:56.298Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello, welcome to my blog. In this article, i will share my knowledge about Business Central native API’s.</p><p>As Microsoft completely moved into SaaS structure, API’s are getting more and more important to read /write transactions into database without actually having access to it.</p><p>As of today, talking about v.19, Business Central contains 54 standard API pages ready to serve. That’s good, because we do not need to develop custom API pages for many objects, like customers, vendors, sales quotes, sales orders… We can directly use standard API pages, but there are some details we can call “good to know”.</p><h4>Which is correct URL i need to make request on native API’s?</h4><p>Well normally when a web service is being published on Business Central, it provides you oData v4 endpoints automatically and you can find in “web services” page:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uX0ujtdOlkLDUgIeFzpCiA.png" /><figcaption>Web Services Page</figcaption></figure><p>However, standart API’s wont be listed here so we need to know url configuration to call standard API’s:</p><p>As for SaaS versions, the host is microsoft itself, so you need to have the base url first : <a href="https://api.businesscentral.dynamics.com/"><strong>https://api.businesscentral.dynamics.com</strong></a></p><p>After host url, you need to have the following : <strong>/v2.0/{{tenant}}/{{environment}}/api/v1.0/companies({{companyId}})/{nativeApiName}</strong></p><p><em>Tenant: Your tenant id given to you with Microsoft subscription</em></p><p><em>Environment: Environment name that you want to operate(Sandbox-Production etc.)</em></p><p><em>CompanyId: The Id of the company that you want to operate. Company id’s can be called from another endpoint :</em> <a href="https://api.businesscentral.dynamics.com/v2.0/%7B%7Btenant%7D%7D/%7B%7Benvironment%7D%7D/api/v1.0/companies"><strong><em>https://api.businesscentral.dynamics.com/v2.0/{{tenant}}/{{environment}}/api/v1.0/companies</em></strong></a></p><p>ApiName: The native API page that you want to make request.</p><p>So final request URL should be like this: <a href="https://api.businesscentral.dynamics.com/v2.0/62f3f5f8-8a7d-4c0e-9088-635138ccc776/Sandbox/api/v2.0/companies(83d0ee75-4089-ec11-bb8b-6045bd8e5ae3)/customers"><strong><em>https://api.businesscentral.dynamics.com/v2.0/62f3f5f8-8a7d-4c0e-9088-635138ccc776/Sandbox/api/v2.0/companies(83d0ee75-4089-ec11-bb8b-6045bd8e5ae3)/customers</em></strong></a></p><p>That sounds good, but you might have a question: Where can i get the list of native API’s, or how can i check the objects from AL?</p><h4>Deep diving into native API’s; checking objects in AL</h4><p>Well, normally users check Microsoft documentation to get some information about native API’s :<em> </em><a href="https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/api-reference/v2.0/"><em>https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/api-reference/v2.0/</em></a><em> </em>. But if you are a person never satisfied with documentation like me, you might not be able to sleep until you see the objects and check the structure behind that beasts.</p><p>Easisest way to see catch those objects and their numbers is using “API Setup” page in Business Central:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KoDPczBtSAIHnWaWgAfyzQ.png" /><figcaption>List of native API Pages</figcaption></figure><p>So we have object id’s, next thing to do is check it from base app:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3d9x_Tdhs_nvBWkDq-fUwg.png" /></figure><p>However, you won’t be able to find objects in range 20000..30096 which are filled by API pages. So where are those pages?</p><p>I have the answer, but do not know the reason exactly. Microsoft decided to “hide” those objects and seperate them from baseapp. So yes, there is another app you need to reference your extension and download your symbols again afterwards. And then, you’ll see the extension which contains all API pages:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/466/1*q4f3oOjeTRYD7QBejj4ojQ.png" /><figcaption>Dependency added to get API Pages</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NxrJTWp4Nz9OTALsTqEfdA.png" /><figcaption>API Page Objects</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yMLCDyqGqGnsh6XFswKr6w.png" /><figcaption>API Page Object refers to “customers”</figcaption></figure><p>So finally it’s possible to study on the structure and most probably same structure can be used when a custom API page needed to be developed. You need to keep in mind that API pages uses “deep insert” which is pretty complicated to understand. I would like to give a reference to Arend-Jan Kauffmann post about deep insert : <a href="https://www.kauffmann.nl/2020/05/05/deep-insert-with-business-central-apis/"><strong><em>https://www.kauffmann.nl/2020/05/05/deep-insert-with-business-central-apis/</em></strong></a></p><h4><strong>So we can move into last part: Using API Setup together with native API’s:</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*VnuC21qU7yeX3al7lFTcKQ.png" /><figcaption>API Setup Page</figcaption></figure><p>API Setup page gives you a chance to use and manage all those native API’s in an order, or some rules. I am going to pick first line for explanation: Table ID:18 and Page ID:5471</p><p>It’s very obvious that this line is created to manage requests on page ID: 5471 which is “customers” and Table Id:18 which is customer table. The critical point here is having a template code for each line, which allows us to define some “constand” or “standard” values like customer or item card templates we have, provides us some standard values when creating a new record.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/955/1*jJfpCSfzWjjcFoE07G1b3Q.png" /><figcaption>API Config. Template</figcaption></figure><p>As per above example, some default values are being defined to some fields, which means when an instance is created using this API endpoint, those values to be added automatically.</p><p>This is very useful option since we have chance to put some filters on API setup page with different config. templates. So it means that for same API endpoint, different behaviours can be defined into system according to values on Json body received from api request. For example, you can have two config. tables according to country code, and posting groups can be configured for each case.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XXha3In9ZUsJpjcai21euQ.png" /><figcaption>A test customer crated using above config. template. The fields are being filled automatically by config. template like posting groups.</figcaption></figure><p>I am planning to share some use-cases of native API’s , some example request-respose cases using postman and an example using it with power automate.</p><p>Hope this article helps you out.</p><p>Thank you for reading.</p><p>Umut Dogan Koc</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c81f80eb4a3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How To Import a JSON File as .NET Object in Microsoft Dynamics NAV]]></title>
            <link>https://umutdogankoc.medium.com/how-to-import-a-json-file-as-net-object-in-microsoft-dynamics-nav-4e8e7ebfd8ed?source=rss-8b101100a559------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e8e7ebfd8ed</guid>
            <category><![CDATA[dynamics-nav]]></category>
            <category><![CDATA[web-services]]></category>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[json]]></category>
            <category><![CDATA[dotnet]]></category>
            <dc:creator><![CDATA[Umut Dogan Koc]]></dc:creator>
            <pubDate>Fri, 28 Jun 2019 14:54:52 GMT</pubDate>
            <atom:updated>2019-06-28T15:05:58.687Z</atom:updated>
            <content:encoded><![CDATA[<h3>How To Import a JSON File as .NET Object in Microsoft Dynamics NAV</h3><p>Most of developers use Web Services for integrations between different servers and objects. In this way, new technologies showed up theirselves and still growing up. In these days, most of developers prefer to use JSON files instead of XML files.</p><p>If you will send a request to a web service, you need to obey many rules due to structure of web service. Most of web services can receive JSON body, and if you send the body with true values, you receive a response and finally you can procees data to your own system. In this article, i will show you the easy way to create a .NET object of a JSON body and use it in C/AL.</p><p>In below image, there is a JSON Body to send a request to Web Service Server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*KxNzMys0w7Dy5cNFScdYcQ.png" /></figure><p>If you will create such request body directly from NAV, you need to convert JSON file to DLL and move it to NAV folder in Server.</p><p>I use Visual Studio to create the DLL file. I create a new Class Library, copy JSON string and past JSON as Classes. Please find below image:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XQLmdqfCVqW_PGHb66JOlA.png" /></figure><p>Now,you have dll file which created from JSON file, now you can play with your DLL, you are free to make development on this. Here is body of my Class Library:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fa3ru82FL9n5tIhTUDbZcQ.png" /></figure><p>Let’s build that solution and create a .DLL file under project root folder. Now all i need to do is, move this .DLL file into NAV root folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tqfhW6LClpM_UbkVfZ3_lw.png" /></figure><p>Path:</p><p>C:\Program Files\Microsoft Dynamics NAV\100\Service\Add-ins</p><p>Drag and drop .DLL here, and you must be able to implement this .DLL to your codeunit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8mqzSSedhjxIQV7MBLubfA.png" /></figure><p>Here you can find my object, i am able to add into my local variables as dotnet object.</p><p>Finally, i created a web service structure, which can receive .JSON objects as input and ready to process such input into NAV tables. In next article, i will talk about getting such data from .JSON object and fill some tables.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e8e7ebfd8ed" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>