Michael Johnson recently discussed Visual Studio Tools Integration with GP Security on his blog. Michael's post looked at how you can obtain the credentials you need to log into the SQL Server as the current user.
I would like to expand on this a little further. When I think of Dynamics GP Security, I think about the application level security that restricts access to forms. So how can I leverage this application level security for my Visual Studio Tools forms?
The answer is to use Menus for Visual Studio Tools for Microsoft Dynamics GP 10.0 to access your forms and let it handle the security integration for you. Built into Menus for Visual Studio Tools is the ability to link the security of your Visual Studio Tools form to any Dexterity form in any Dictionary. You just need to specify the Dictionary ID and Resource ID. There is a helper function to convert the Dexterity Form's Technical Name to a Resource ID for you.
You can apply the security either when you register the menu entry for your Visual Studio Tools form or after you have registered your menu entry. Please see the code excerpts below taken from the example code which comes with Menus for Visual Studio Tools. These excerpts only show the main calls used and do not have the error handling of the full code. Please use the full code included in the downloadable archive. The example registers two menus, one with Security and one without and then uses an additional command to add security to the second menu.
Dim MenuTag1 As ShortDim MenuTag2 As ShortDim ResID As Short = 0
MenuTag2 = MenusForVisualStudioTools.Functions.Register.Invoke( MenuListTag1,
For the links to download the tool and information about support please follow the link below:
Menus for Visual Studio Tools - The wait is over
David
Posting from DynamicAccounting.net
http://msdynamicsgp.blogspot.com/2009/10/more-visual-studio-tools-and-gp.html
Posting from Mohammad Daoud
http://mohdaoud.blogspot.com/2009/10/visual-studio-gp-security.html
PLEASE READ BEFORE POSTING
Please only post comments relating to the topic of this page.
If you wish to ask a technical question, please use the links in the links section (scroll down, on right hand side) to ask on the Newsgroups or Forums. If you ask on the Newsgroups or Forums, others in the community can respond and the answers are available for everyone in the future.