How to enable Visual Studio Tools Customisations for the Web Client

David Meego - Click for blog homepageHave you ever written some cool Visual Studio Tools (VST) code that worked great on the desktop client, but does not work on the web client? VST code that does not use any WinForms or uses WinForms but only with supported controls and so should work?

Well, I have. A great example is the Company Login window customisations covered in the blog posts below:

The code worked fine on the desktop client, but had no effect in the web client. Something was missing, but I did not know what.

When I mentioned my problem to my good friend Mariano Gomez (The Dynamics GP Blogster), he knew what the issue was and sent me the link to an MSDN article.

The MSDN article below explains the details of what is required to make Visual Studio Tools customisations work on the web client.

In the code samples below you can see the added SupportedDexPlatforms attribute which is used to tell Visual Studio to make this code available for the desktop client and the web client. Without this additional attribute, the default behaviour would be to only work on the desktop client.

Visual C# code sample

namespace CSharpSample
{
    [SupportedDexPlatforms(DexPlatforms.DesktopClient | DexPlatforms.WebClient)]
    public class GPAddIn : IDexterityAddIn
    {
        // IDexterityAddIn interface

        public void Initialize()
        {
        }
    }
}

 

Visual Basic .Net code sample

<SupportedDexPlatforms(DexPlatforms.DesktopClient Or DexPlatforms.WebClient)>
Public Class GPAddIn
    Implements IDexterityAddIn

    ' IDexterityAddIn interface

    Sub Initialize() Implements IDexterityAddIn.Initialize

    End Sub

End Class

 

Hope you find this useful.

David

This article was originally posted on http://www.winthropdc.com/blog.

4 thoughts on “How to enable Visual Studio Tools Customisations for the Web Client

  1. Beat Bucher's avatar

    This starts to look interesting and make me thing of taping back into coding, which is where I started my IT career many years ago when learning Cobol 🙂

Leave a Reply to Beat BucherCancel reply