Skip to main content

Notifications

Microsoft Dynamics GP (Archived)

VST menus - which table has the names of the form and command names

Posted on by Microsoft Employee

We're using the VST menus add on create access to a .net window via GP's menus.

Which tables the names of all the form and command names we can use?  I'm looking at the SY07110 table, but they are all IDs, is there a table that stores the names of these IDs.

Ultimately, we're trying to use the following code (but not all the window under sales) to add the window in the manufacturing | transactions | wip menu:  

// Get Parent Tag for command list to add menu to

                ParentTag = MenusForVisualStudioTools.Functions.GetTagByName.Invoke(

                                    DYNAMICS, "Command_Sales", "CL_Sales_Cards");           // Dictionary ID, Form Name, Command Name

                if (ParentTag <= 0)

                {

                    throw new Exception("Parent GetTagByName, error code: " + Convert.ToString(ParentTag));

                }

 

                // Get Below Tag for command/command list to add menu below

                BelowTag = MenusForVisualStudioTools.Functions.GetTagByName.Invoke(

                                    DYNAMICS, "Command_Sales", "RM_Customer_Maintenance");  // Dictionary ID, Form Name, Command Name

                if (BelowTag <= 0)

                {

                    throw new Exception("Below GetTagByName, error code: " + Convert.ToString(BelowTag));

                }

 

                // Get Security Form Resource ID for menus to inherit security access from

                ResID = MenusForVisualStudioTools.Functions.GetFormResId.Invoke(

                                    DYNAMICS, "RM_Customer_Maintenance");                   // Get Form Resource ID for Security 

                if (ResID <= 0)

                {

                    throw new Exception("GetFormResId, error code: " + Convert.ToString(ResID));

                }

 

                // Add Menu entry using API Function call to create parent for sub menu

                MenuListTag1 = MenusForVisualStudioTools.Functions.Register.Invoke(

                                    ParentTag,                                              // Parent Command Tag

                                    "VS C\\# Test",                                         // Menu Caption

                                    "",                                                     // Menu Tooltip

                                    0, 0,                                                   // Menu Shortcut Key, Shortcut Modifier

                                    false, false, false,                                    // Checked, Disabled, Hidden

                                    BelowTag,                                               // Add Below Command Tag

                                    false, true);                                           // Add Separator, Add Command List

                if (MenuListTag1 <= 0)

                {

                    throw new Exception("Command List Register, error code: " + Convert.ToString(MenuListTag1));

                }

 

                // Add Menu entry using API Function call to create first sub menu entry with security

                MenuTag1 = MenusForVisualStudioTools.Functions.RegisterWithSecurity.Invoke(

                                    MenuListTag1,                                           // Parent Command Tag

                                    "VS C\\# Test 1",                                       // Menu Caption

                                    "Click for VS C# Test 1",                               // Menu Tooltip

                                    (int)'A', COMMAND_SHORTCUT_CTRLALT,                     // Menu Shortcut Key, Shortcut Modifier

                                    true, false, false,                                     // Checked, Disabled, Hidden

                                    0,                                                      // Add Below Command Tag

                                    false, false,                                           // Add Separator, Add Command List

                                    DYNAMICS, ResID);                                       // Security Dictionary and Form Resource ID

                if (MenuTag1 <= 0)

                {

                    throw new Exception("Command 1 RegisterWithSecurity, error code: " + Convert.ToString(MenuTag1));

                }

*This post is locked for comments

  • Verified answer
    Patrick Roth Profile Picture
    Patrick Roth on at
    RE: VST menus - which table has the names of the form and command names

    Chi Cheong,

    this information isn't stored in a table.  You can get it with Dexterity or much easier use PSTL.

    I wrote a blog article a while ago on this exact subject.

    blogs.msdn.com/.../finding-command-forms-and-commands-to-use-with-menus-for-visual-studio-tools-or-dexterity.aspx

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans