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)

C# Event trigger in C/AL

(0) ShareShare
ReportReport
Posted on by

How to stop Nav from continue process and wait for the trigger in c#.

The situation is like this:

1. I need to pass in some value to c# to process.

2. In the c#, there is a web service which will process the value I pass in from nav.

3. The process value will return in delegate event trigger in c#.

4. Then the value will return to nav when the delegate event is triggered. 

The problem is, nav will continue to run even the value is not return yet from the c#. Is there anyway I can stop nav from processing and wait until the value from c# is return?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Suresh Kulla Profile Picture
    50,245 Super User 2025 Season 2 on at

    Cheng,

    How are you calling your function in C# ? You can use SLEEP function to wait and check for return value.

  • Community Member Profile Picture
    on at

    I declare a Global variable with dotnet type. set the withevents properties to yes.

    On the same codeunit, on run trigger I initiate the instance and called 'CalValues' from c#.

    I did tried with sleep, after sleep the nav continue to process the next statement instead process the c# trigger function in nav.

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