Personalized Community is here!
Quickly customize your community to find the content you seek.
Choose your path Increase your proficiency with the Dynamics 365 applications that you already use and learn more about the apps that interest you. Up your game with a learning path tailored to today's Dynamics 365 masterminds and designed to prepare you for industry-recognized Microsoft certifications.
Visit Microsoft Learn
2022 Release Wave 2Check out the latest updates and new features of Dynamics 365 released from October 2022 through March 2023
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Community | FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
I am trying to consume web services . but while i was trying to build solution in c# visual studio it was throwing an error by saying web services does not exist in namespace what i have done:
basically created one codeunit (in codeunit created one function to get customer no. )and published web services it by calling "ConsumeWS"
then open visual studio and follow below mentioned process:
Ceate a new Console Application project in Visual Studio.
In Solution Explorer, right-click on the Reference node and choose Add Service Reference.
In the Add Service Reference window, choose the Advance button.
In the Service Reference Settings window, choose Add Web Reference. Then enter localhost/.../Services and click on the green button with an arrow.
When the ConsumeWS service is displayed, choose View Service. Then enter WebService in Web reference name: and choose Add Reference.
Add the following code to the programcode::
public class ConsumeWebService
public static void Main(string args)
ConsumeWS ws = new ConsumeWS();
ws.UseDefaultCredentials = true;
}after adding when i build solution i am getting below attached error
Never did on NAV 2009, but if you can just try on NAV 2013 or later I can help you out.
Thanks for reply... but as per our client requirement we have to implement on NAV 2009 R2 only.
The problem is in this line:
1) This is not the place to insert a USING clause, if needed it must be placed at the top of your code (following other USING clause)
2) Using wants a namespace. Here, what is "webservice"?
Except the error at point 1, your code is good. Just move the using and check your web service reference namespace.
Issue resolved already.....Actually there was a silly mistake while adding web ref name (WebService),need to select your web service page or codeunit first .
BDW thank u all for your kind reply!!
Business Applications communities