web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
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,177
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
    239,093 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Mallesh Deshapaga Profile Picture

Mallesh Deshapaga 280

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 187 Super User 2026 Season 1

#3
Venkat Profile Picture

Venkat 122

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans