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

Problems adding a new menu to GP2013 Human Resources Transactions Menu

(0) ShareShare
ReportReport
Posted on by

In our GP integration we have menus that should add to the Human Resources Transactions menu. I've tried this using both Dexterity and VS Tools for GP, but even though the menus successfully register they don't show up under the HR Transactions menu.

When i step through using visual studio, the only strange thing is that the root HR menu tag is a negative value, i'm not really sure what the means in the context, but i have never seen that type of behavior before.

The same code works for GP10 and GP2010 and it hasn't changed, so i'm really not sure what the issue is.

Any help would be appreciated, the code snippets for my C# addin is below.

using System;

using System.Collections.Generic;

using System.Text;

using Microsoft.Dexterity.Bridge;

using Microsoft.Dexterity.Applications;

namespace TimeCodeTransferMenus

{

   public class GPAddIn : IDexterityAddIn

   {

       // IDexterityAddIn interface

       short HRTrxMenuTag;

       short TimeCodeMenuTag;

       short MassTimeCodeMenuId;

       public void Initialize()

       {

           MenusForVisualStudioTools.Functions.EventRegister.InvokeAfterOriginal += new Microsoft.Dexterity.Applications.MenusForVisualStudioToolsDictionary.EventRegisterFunction.InvokeEventHandler(EventRegister_InvokeAfterOriginal);

           MenusForVisualStudioTools.Functions.EventHandler.InvokeAfterOriginal += new Microsoft.Dexterity.Applications.MenusForVisualStudioToolsDictionary.EventHandlerFunction.InvokeEventHandler(EventHandler_InvokeAfterOriginal);

       }

       void EventHandler_InvokeAfterOriginal(object sender, Microsoft.Dexterity.Applications.MenusForVisualStudioToolsDictionary.EventHandlerFunction.InvokeEventArgs e)

       {

           if (e.inParam1 == TimeCodeMenuTag)

           {

               Microsoft.Dexterity.Applications.CogsdaleCsm.Forms.UmUprTimeCodeTransfer.Open();

           }

           if (e.inParam1 == MassTimeCodeMenuId)

           {

               Microsoft.Dexterity.Applications.CogsdaleCsm.Forms.UmUprTimeCodeMassTransfer.Open();

           }

           //throw new NotImplementedException();

       }

       void EventRegister_InvokeAfterOriginal(object sender, Microsoft.Dexterity.Applications.MenusForVisualStudioToolsDictionary.EventRegisterFunction.InvokeEventArgs e)

       {

           //throw new NotImplementedException();

           HRTrxMenuTag = MenusForVisualStudioTools.Functions.GetTagByName.Invoke(0, "CL_HumanResources_Transactions", "Command_System");

           if (HRTrxMenuTag != 0)

           {

               TimeCodeMenuTag = MenusForVisualStudioTools.Functions.Register.Invoke(HRTrxMenuTag, "Time Code Transfer", "Time Code Transfer", 0, 0, false, false, false, HRTrxMenuTag, false, false);

               MassTimeCodeMenuId = MenusForVisualStudioTools.Functions.Register.Invoke(HRTrxMenuTag, "Time Code Mass Transfer", "Time Code Mass Transfer", 0, 0, false, false, false, HRTrxMenuTag, false, false);

           }

       }

   }

}

*This post is locked for comments

I have the same question (0)

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans