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)

Dynamics GP Customizations - VS Tools dll files

(0) ShareShare
ReportReport
Posted on by 7,365

We have a customization that we made with the Visual Studio Tools for Dynamics GP and it makes a dll file that we put in the Add-Ins directory of the GP Client.

We also created a config file so we could put the server name in it and point to out different environments (QA, Production, Development).  However, it seems like the dll file just ignores the config file and uses the server name that was in the settings file when the program is compiled/built.

Does anyone know the trick to this?  It defeats the purpose of having the config file if it isn't being read.  It also means I have to specifically compile a version for each environment I want to test in.  I would prefer to have one dll file that I can frag into the other add-in folders.

This is for GP 10 and it is a dll behind the Purchasing Batches Window that intercepts the posting button click event.

*This post is locked for comments

I have the same question (0)
  • Richard Wheeler Profile Picture
    75,848 Moderator on at

    How are you connecting to the GP database? Are you using the GPConnNet resource? This allows your program to grab the login credentials of the user currently in GP calling your program and then you can have config files providing whatever other connection strings to your other databases.

  • Community Member Profile Picture
    on at

    if you utilize the table buffers, you can update the databases directly and you don't need to identify a connection string or use the GPConn.dll to get access to the database  This database uses a similar approach to interacting with the database as Dexterity does.

    Regards,

    Aaron

  • Andrew John Dean Profile Picture
    1,337 on at

    I concur with the 2 previous posting. If however there is a valid reason to read from a config file http://dynamicsgpgeek.blogspot.com/2009/10/accessing-dynamicsexeconfig.html details how to get a VSTools dll to read from the Dynamics.Exe.Config file

    Regards

    Andrew Dean - Envisage Software Solutions

    www.envisagesoftware.com

  • Suggested answer
    Community Member Profile Picture
    on at

    If you want to use Config with add-in instead of the Dynamics.exe.config file, you can refer to following blog post

    blogs.msdn.com/.../how-to-read-your-own-config-file-with-a-vstools-application.aspx

    I have used this technique with GP10 and it works like piece of cake

    Rubal

    http://www.dynamicsgphelp.com/

  • K Day Profile Picture
    7,365 on at

    Wow, all great answers.  It guess I wasn't getting emails about replies.  It seems like there are a couple of right answers.  We are actually connecting to the server with a hard coded connection string, wanting just the server name to pull from the config file.  It is actually not a GP Database we are connecting to.  We have lots of crazy customizations so we keep most of our custom Stored Procedures, views and tables in other Custom Databases but the same GP Server.  We are also using eConnect from within the dll and want to use the same config file for the server name because our eConnect runtime is running as different service account in our production and QA/DEV environments.  Right now is seems like even though we are trying to use the settings with a server name and it produces a config file upon building the project, it just isn't reading it and is running with whatever server was in the settings when we compiled it.  So each time we need to make a change, we need to recompile it 3 times for 3 environments.  Would rather just drag the working dll from DEV to QA to Production and just have the config different.

    By the way, we are also hard coding a login and password that we use for all of our customizations inside the project (as well as vba customizations on windows).  This way we don't have to explicitly grant GP users access to out custom databases and objects.  All the work is SQL done by one login.

     

    Thanks for the answers.

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