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 :
Supply chain | Supply Chain Management, Commerce
Answered

Identify if the session is in API call vs Interactive UI in X++

(1) ShareShare
ReportReport
Posted on by 3,175
Hello Community 
 
I need to run a common code logic only in Interactive mode, but not when it is called by API.
 
In X++, How do I Identify if the session is in API call vs Interactive UI ?
 
This will help me determine if a prompt/dialog could be presented.
 
Regards
San
I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    237,990 Most Valuable Professional on at
    hasGUI() should do the job.

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 > Supply chain | Supply Chain Management, Commerce

#1
Laurens vd Tang Profile Picture

Laurens vd Tang 307 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 123 Super User 2025 Season 2

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 67 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans