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

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

detect web client vs desktop client with visual studio tools

(0) ShareShare
ReportReport
Posted on by 95

Can you detect the client type in visual studio tools?

Ultimately, I'm looking to create links as buttons on GP forms to open external web sites, but the way i do it on a desktop client (using an old fashioned ShellExecuteA) doesn't work in the web client.

i'd hope to detect the webclient in code to be able to alter the method used to open the web site.

Any suggestions?

Thanks

Categories:
I have the same question (0)
  • Suggested answer
    Jeff M Profile Picture
    95 on at
    RE: detect web client vs desktop client with visual studio tools

    Finally found this:

    community.dynamics.com/.../355733

    int iClientType = Dynamics.Forms.SyVisualStudioHelper.Functions.DexRuntimeGetClientType.Invoke();
    String sWebSite = ;
    
    if (iClientType == 1) //Desktop Client
        Process.Start(sWebSite);
    else //Web Client
        Dynamics.Forms.SyVisualStudioHelper.Functions.DexUtilityLaunchUrl.Invoke(sWebSite);
    

    Does what i needed

    Thanks

  • Suggested answer
    David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    14,087 Most Valuable Professional on at
    RE: detect web client vs desktop client with visual studio tools

    Hi Jeff

    You can also use the Dynamics.Functions.IsWebClient.Invoke() function

    This is what we use from Dexterity.

    Regards

    David

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 683 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 398 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans