Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

How to use CreateCompletedEventHandler with the web service

(0) ShareShare
ReportReport
Posted on by 215

I am using a web service connection to my company's test NAV environment (NAV 2013).  I need to add a customer to the NAv environment.  So for I have been able to make this code work:

 

var customerService = new CustomerService.Customer_Service()  {UseDefaultCredentials = true};

var cust = new CustomerService.Customer()  {Address = "100 Orion Way", Name = "Test") };

customerService.Create(cust);

 

Now I need to create the customer Asynchronously and track of the call is complete.  I know I need to use CreateAsync(Customer _customer, Object _userState) and CreateCompletedEventHandler but I cannot find anywhere how to it.  Does anyone have an example?

*This post is locked for comments

  • Scott Wright Profile Picture
    Scott Wright on at
    Re: How to use CreateCompletedEventHandler with the web service

    Hi Ben,

    Thank you for submitting your question.

    Freddy Kristiansen has a blog posting that includes an Async example using Silverlight. It is a Read but it should get you started.

    Connecting to NAV Web Services from Silverlight 3
    blogs.msdn.com/.../connecting-to-nav-web-services-from-silverlight-3.aspx

    I hope this help! Have a good weekend!

    Kindest Regards,

    Scott Wright

    Partner Online Technical Community
    -----------------------------------------------------------------------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans