Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV forum
Suggested answer

Calling a codeunit webservice in synchronous mode does not wait for the function to end, no error reported.

Posted on by 55

Hello

From a C# application, In the following code, I create a log  before begin calling a CodeUnit function on a Microsoft Navision webservice, the third line is supposed to log when I ended the call. but in most cases that one is not executed

All the code is inside a try catch section and the exception is never generated.

_CRunConsole.WriteLine("Begin TConnector_ProcessValidatedDocuments(). " + DateTime.Now.ToLongTimeString());
_CU_IntegrationWithThirdSystems.TConnector_ProcessValidatedDocuments();
_CRunConsole.WriteLine("End TConnector_ProcessValidatedDocuments(). " + DateTime.Now.ToLongTimeString());

Thank you in advance for your support.

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,640 on at
    RE: Calling a codeunit webservice in synchronous mode does not wait for the function to end, no error reported.

    Do you get any return value from NAV in the call, if not try getting a return value and then see if it logs the third line.

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

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

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,558 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,645 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans