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