Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Create webservice in NAV2018 to use in external app, return JSON with item information

(0) ShareShare
ReportReport
Posted on by 2

Hi All,

I need to create a webservice in NAV 2018 to be used in an external app. The webservice is called for a specific item number, the webservice should return a JSON with some relevant information of this specific item.

I have a hard time finding a good example which is covering this issue, can anybody provide me a simple example?

Thanks in advance,
Yannick

  • Suggested answer
    Jyotsna NAV Profile Picture
    585 on at
    RE: Create webservice in NAV2018 to use in external app, return JSON with item information

    Ok.. no problem.

    See it this thread helps you. 

    https://community.dynamics.com/business/f/dynamics-365-business-central-forum/289733/multiple-layers-json-reading/830739

    Regards

    Jyotsna Oberai 

    Kindly verify my answer if it helped you in any way. 

  • Dennis Pardaan Cornator Profile Picture
    2 on at
    RE: Create webservice in NAV2018 to use in external app, return JSON with item information

    Well, I actually have three levels.... creating three webservices doesn't feel like the right solution.

    Thanks for you help, I will try to find another solution!

  • Suggested answer
    Jyotsna NAV Profile Picture
    585 on at
    RE: Create webservice in NAV2018 to use in external app, return JSON with item information

    You can have an odata too for your CRUD operations.

    This two level is not quite feasible and complicated something called as deep insert. For a data like this,what I can also recommend is to create two web services one for Item and another for Item variant and use it's odata as pages. (For passing data from nav to external application)

    The external application can use these 2 services in their JavaScript and accept it that way.

    Thank you.

    Regards

    Jyotsna Oberai

    Please mark my answer as verified if it helped you in any way.

  • Dennis Pardaan Cornator Profile Picture
    2 on at
    RE: Create webservice in NAV2018 to use in external app, return JSON with item information

    Thanks Jyoysna,

    Couple of questions....

    I can only use this as a SOAP?

    I don't understand how to expose the JSON build in the function GetItem?

    How can I build a JSON with multiple levels (item -> item variant)?

    I would like to do a webservice call like this.... webservice url/getitemnumber('1000')

    and return a JSON like this....

    {

     "name": "Item description",

    "itemnumber": "1000"

     },

     "variants": [

       {

         "name": "White",

         "inventory": 11

       },

       {

         "name": "Red",

         "inventory": 13

       }

     ]

    }

  • Suggested answer
    Jyotsna NAV Profile Picture
    585 on at
    RE: Create webservice in NAV2018 to use in external app, return JSON with item information

    Check these two Integration blogs: 

    jyotsnanav.blogspot.com/.../integrating-dynamics-365-field-service.html

    https://jyotsnanav.blogspot.com/2020/04/integrating-dynamics-365-field-service_19.html?m=1

    Thank you. 

    Regards

    Jyotsna Oberai 

    Please mark my answer as verified if it helped you in any way. 

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
YUN ZHU Profile Picture

YUN ZHU 616 Super User 2025 Season 1

#2
Mansi Soni Profile Picture

Mansi Soni 487

#3
Sagar Dangar, MCP Profile Picture

Sagar Dangar, MCP 391

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans