web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Consume External web service in NAV

(0) ShareShare
ReportReport
Posted on by 20

Good morning all,

I want send a customer informations NAV to SAP with using web service SAP. is it possible?

my partner SAP send me a file WSDL so I can send information from NAV To SAP.

kind regards

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Andrey Baludin Profile Picture
    3,941 on at

    Hi, Thabet!

    Yes, it's quite easy. Check Codeunit 1297 Http Web Request Mgt..

    Also you can create your own request function, using .net. Just check how to do it with C# and repeat with the same .net variables in C/AL.

  • Thabet Profile Picture
    20 on at

    Hi Andrey,

    Thank you for answer. you have an example of use Codeunit 1297.

  • Verified answer
    Andrey Baludin Profile Picture
    3,941 on at

    Hi! For example:

        PROCEDURE SendRequest@1000000001();
        VAR
          HttpMgt@1000000001 : Codeunit 1297;
        BEGIN
          HttpMgt.CheckUrl('https://someurl');
          HttpMgt.Initialize('https://someurl');
          HttpMgt.SetMethod('POST');
          HttpMgt.AddHeader('Authorization', 'Basic ' + '123412341234');
          HttpMgt.AddBodyAsText('<req><query>' + Request + '</query></req>');
          HttpMgt.CreateInstream(IStream);
          HttpMgt.GetResponseStream(IStream);
        END;


  • Thabet Profile Picture
    20 on at

    Thanks

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
HoangNam Profile Picture

HoangNam 7

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans