Skip to main content

Notifications

Small and medium business | Business Central, N...
Suggested answer

Filling/inserting custom table data using provided API services

Posted on by 105

Hi all,

Am new in using API in business central, can any one please help me with link or materials to go through on

-Inserting data in to custom table using API example given the link https://jsonplaceholder.typicode.com/users I want to utilize that list and fill my custom table

am using OnPrem BC

  • Suggested answer
    Govinda Kumar Profile Picture
    Govinda Kumar 2,203 Super User 2024 Season 1 on at
    RE: Filling/inserting custom table data using provided API services

    There's an error in the code or a mistake.. when you are parsing json.. you should try to add a debugger and see where your code is breaking..

    Regards

  • Maro9595 Profile Picture
    Maro9595 105 on at
    RE: Filling/inserting custom table data using provided API services

    That was wonderful video thank you, though I stacked on final stage

    Error

    Unable to convert from Microsoft.Dynamics.Nav.Runtime.NavJsonValue to System.Int32.

  • Maro9595 Profile Picture
    Maro9595 105 on at
    RE: Filling/inserting custom table data using provided API services

    Thank you ZHU

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 73,296 Super User 2024 Season 2 on at
    RE: Filling/inserting custom table data using provided API services

    Hi, I recommend the two videos of Erik below, I hope they can also help you.

    How to make a simple API call with a json reply in Business Central

    https://www.youtube.com/watch?v=D5jzrgl1EP0

    JSON in AL for beginners - Essential development knowledge for Business Central

    https://www.youtube.com/watch?v=so7_bOxp9V4

    Thanks.

    ZHU

  • Suggested answer
    Govinda Kumar Profile Picture
    Govinda Kumar 2,203 Super User 2024 Season 1 on at
    RE: Filling/inserting custom table data using provided API services

    Hi Maroh Kimaro,

    I have found a video that explains how to insert data into a custom table using API in Business Central, and it uses the same example provided in the link you shared. Here is the link to the video

    I hope this information is helpful.

    Regards.

  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,748 Super User 2024 Season 1 on at
    RE: Filling/inserting custom table data using provided API services

    For this you will need to use the http client that you have available in the AL.

    learn.microsoft.com/.../httpclient-data-type

    Take the respons you get there and load it into a json object

    learn.microsoft.com/.../jsonobject-data-type

    Parse the json object and then insert records into your desired table

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.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,188 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,030 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans