Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

To call Web Service from NAV C/AL

(0) ShareShare
ReportReport
Posted on by 46

Dear Members,

Please, guide me with this issue.

To use NAV WS from another NAV database, we are testing below example. There is one thing we couldn't understand what  is salesOrderService variable.  Think, it is a .net assemly, but we need more clear guidance for this.

https://msdn.microsoft.com/en-us/library/hh169399(v=nav.90).aspx 

*This post is locked for comments

  • RockwithNav Profile Picture
    6,869 on at
    RE: To call Web Service from NAV C/AL

    Hi Ariuka,

    Can you elaborate your question a bit more.

    Are you Just trying to call a Method of NAV Codeunit say Database A exposed as Web Service for NAV Database B.  This function needs to be called with certain Parameter from Database B which will get executed in Database A and will perform the Operation.

    Is this what you are trying to Ask??

  • Suggested answer
    keoma Profile Picture
    32,727 on at
    RE: To call Web Service from NAV C/AL

    best you start with the great article from vjeko

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

    you could also create a sample c# app, add a web service reference to the nav web service. in the project subfolder <user folder>\Projects\ConsoleApplication1\ConsoleApplication1\obj\Debug\TempPE you'll find the dynamically created assembly Web References.NavProxy.Reference.cs.dll, where NavProxy is the name of the referenced nav web service in your c# project. that assembly contains the reference class which wraps the nav web service. use that assembly to connect to the nav web service in your c/al code.

    also follow https://msdn.microsoft.com/en-us/library/gg502468.aspx

  • Ariuntungalag Davaanyam Profile Picture
    46 on at
    RE: To call Web Service from NAV C/AL

    Thank you Alexander.

    Yes, SalesOrderService is .net assembly, but in this example there no clarification about how to create this assembly.

    Also I studied this video, actually very useful :) www.youtube.com/watch

    but my requirement is little different, we need to read/update data with C/AL.

    Here is the questions:

    1. Should we use SN Assembly with NAV Web Services as server experience ?

    2. Can we read/update data with C/AL  SN Assembly with NAV Web Services ?

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: To call Web Service from NAV C/AL

    Hello Ariuka,

    the salesOrderService in this example is indeed a .NET Assembly.

    You can find it under the global or local variables window when choosing a DOT Net Assembly variable:

    Screenshot_5F00_1_5F00_Assembly-Name.PNG

    Screenshot_5F00_1_5F00_Assembly-Name.PNG

    After selecting the 3.0.0.0-Version of the Assembly (like in the MSDN-example) simply choose the correct Assembly Object:

    Screenshot_5F00_2_5F00_Assembly-Object.PNG

    I hope this solves your Problem.

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 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…

Leaderboard > Microsoft Dynamics NAV (Archived)

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2

#1
mmv Profile Picture

mmv 2

#1
Amol Salvi Profile Picture

Amol Salvi 2

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans