Skip to main content

Notifications

Microsoft Dynamics NAV (Archived)

Call an external API from NAV C/AL code

Posted on by 2,576

Hi all,

Can someone suggest how to call an external api from NAV C/AL code ?

Thanks

*This post is locked for comments

  • Krish Roy Profile Picture
    Krish Roy 35 on at
    RE: Call an external API from NAV C/AL code

    HI, I am sorry but there is no such Code unit in NAV2013 I know the code unit 1290 and 1297 are available or can be import in 2015 and later versions.

    But I am using NAV 2013 right now and I am really fedup while searching stuffs regarding the same but none of them were helpful.

    I need to call API with some headers and xml body but I am unable to use Streamwriter and other in order to hit the api and get a proper response.

    Its working fine with headers only but no idea how to add body content.

    Is there some one who can help me?

  • Verified answer
    TharangaC Profile Picture
    TharangaC 23,116 on at
    RE: Call an external API from NAV C/AL code

    Hi, 

    You can call external web services using "Web Service Request Mgt" codeunit. There are many examples related to this. Please refer below URLs :

    https://community.dynamics.com/nav/b/moxie4nav/archive/2015/09/10/call-external-web-service-using-new-cu-1290

    http://vjeko.com/web-services-black-belt-consuming-nav-web-services-using-pure-cal/#

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!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

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

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans