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 GP (Archived)

AddIn code not working on web client

(0) ShareShare
ReportReport
Posted on by

Hi there,
I'm using Visual Studio Tools for Dynamics GP for the first time. Using GP 2013 R2 and Visual Studio 2013 (C#). The code works on the rich client but not on the web client. Any ideas on how I can I figure out why?

DLL has been copied to the AddIns folder.

Code used:

using System;

using System.Collections.Generic;

namespace DynamicsGPAddin1

{

[SupportedDexPlatforms(DexPlatforms.WebClient | DexPlatforms.DesktopClient)]

public class GPAddIn : IDexterityAddIn

{

// Create a reference to the Item Maintenance form

public static IvItemMaintenanceForm ItemMaintenanceForm = Dynamics.Forms.IvItemMaintenance;

// Create a reference to the Item Maintenance window

private IvItemMaintenanceForm.IvItemMaintenanceWindow ItemMaintenanceWindow = ItemMaintenanceForm.IvItemMaintenance;

 // IDexterityAddIn interface

public void Initialize()

{

// Create an instance of the Environmental Details form when the Item Maintenance form opens

ItemMaintenanceForm.OpenAfterOriginal += new EventHandler(ItemMaintenanceForm_OpenAfterOriginal);

// Find out if the add-in is being run on the web client

}

void ItemMaintenanceForm_OpenAfterOriginal(object sender, EventArgs e)

{

Int16 answer;

// Message Box for web client as MessageBox doesn't work on there

answer = Dynamics.Forms.SyVisualStudioHelper.Functions.DexAsk.Invoke("RS test - please ignore", "Yes", "No", "Cancel");

// set default value for field Description

this.ItemMaintenanceWindow.ItemDescription.Value = "RS Test";

//MessageBox.Show("RS TESTING");

}

}

}

*This post is locked for comments

I have the same question (0)
  • soma Profile Picture
    24,410 on at

    To deploy your VSTools customization to GP 2013 web client, you need follow below things.

    1. Paste you dll file to GP installation folder instead of AddIns folder.

    2. Add you addins product details to the Dynamics.exe XML file.

    To get more details about VSTools deployment for GP web client, please have a look on the file VSTDGPReadMe  which is located under the VSTools SDK installation folder (by default: C:\Program Files (x86)\Microsoft Dynamics\GP2013 VS Tools SDK).

    Also have a look on the Chapter 10 from the VSTDGPProgrammersGuide.pdf file which also located on the same  VSTools SDK installation path.

    Hope this helps!!!

  • soma Profile Picture
    24,410 on at

    Please have a look on the conversations from below link.

    community.dynamics.com/.../102766.aspx

    Hope this helps!!!

  • Community Member Profile Picture
    on at

    Thanks for the prompt responses.

    I did try those and wasn't 100% sure. I tried it again and it still doesn't seem to work. I added the file to the GP2013 folder and added the following to the config file:

    <addin name="DynamicsGPAddin1" type="DynamicsGPAddin1.GPAddIn,DynamicsGPAddin1,Version=1.0.0.0,Culture=neutral,PublicKeyToken=3aee5f27-4295-4b59-b984-7b1ae66dd207"/>

    Is there any way of checking that GP is picking up the file at all?

    Do I just exit GP and then go back in again to test?

    Regards,

    R Salie

  • Community Member Profile Picture
    on at

    The above was added to the DynamicsGPWeb section in the config file.

    Do I only copy the DynamicsGPAddin1.DLL over?

  • Community Member Profile Picture
    on at

    I have still not been able to resolve this issue.

    When logging into the web client I get the following error - Invalid Collections Management registration key. I don't think this will affect the AddIns though.

    I checked ProcessMonitor and it looks like the AddIns are being loaded (from the GP folder and from the AddIns folder).

    It is as if the DLL is not referenced at all - nothing of the AddIn is done and also no errors. For example, I added a reference to a Modified form and it didn't complain when the related DLL was not copied over - the desktop client did.

    Is there a way to configure the use of AddIns - switch it off? I'm leaning toward an installation error as this is a new installation - problem is that I didn't set it up, nor do I know much of how to set it up.

  • soma Profile Picture
    24,410 on at

    1. Paste only the DynamicsGPAddin1.DLL to GP installation folder.

    2. Try the below

    <addin name="DynamicsGPAddin1" type="DynamicsGPAddin1.GPAddIn,DynamicsGPAddin1"/>

    Note: To have add-ins loaded for the web client, add the SupportedDexPlatforms attribute to the class that implements the IDexterityAddIn interface for your integration. Refer to the section Specifying supported clients in Chapter 10, "Building and Deploying" for complete details about how to configure when an add-in is loaded from the VSTools SDK installation folder (by default: C:\Program Files (x86)\Microsoft Dynamics\GP2013 VS Tools SDK).

    Hope this helps!!!

  • Community Member Profile Picture
    on at

    I did, been trying alotta things. Not luck just yet.

    Must be something with the installation.

  • soma Profile Picture
    24,410 on at

    Have you added the below code to you projects?

    In the following C# example, the logical-or operation is used to indicate that both

    the desktop client and the web client are supported.

    namespace CSharpSample

    {

             [SupportedDexPlatforms(DexPlatforms.DesktopClient |

             DexPlatforms.WebClient)]

             public class GPAddIn : IDexterityAddIn

            {

                 // IDexterityAddIn interface

                public void Initialize()

                {

                }

             }

    }

  • Community Member Profile Picture
    on at

    I am, see code attached to original post.

    Thanks for all the feedback Soma

  • Verified answer
    Community Member Profile Picture
    on at

    Told this morning that a colleague got this working after creating another DEV environment. He doesn't know what the issue is with the environment I worked on. We will be doing the development shortly and holding thumbs that it all works out.

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 GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans