30 September, 2009

Avoid some GP Form Modifications with VSTools

I've been doing a lot of work with Visual Studio Tools lately and find myself migrating more towards that from VBA. VSTools is not a replacement for VBA but in some cases can prove to be a more effective tool.

Modifying a Form in GP is often a simple thing to do with few repercussions if planned and executed properly. One drawback to a form modification is that you have to upgrade the modified forms even when applying service packs. This makes the service pack application and upgrade processes slightly more cumbersome. Not a big deal but another step in the process that in some instances you might be able to avoid. Some of my existing clients are starting to request VSTools customizations over VBA partly for this reason.

While this isn't always applicable, you can't modify a GP Form with VSTools after all, you can sometimes leverage the VSTools .AddMenuHandler method in place of modifying a form in GP. You can find more information about the .AddMenuHandler on page 71 of the VSTDGPProgrammersGuide.pdf.

Here's an example of how to use the .AddMenuHandler method instead of modifying a GP Form:

Below is the code to add an Additional Menu Handler that when executed calls a function that will retrieve the next numeric Fixed Asset ID and populate the Asset ID in the Asset General Information Window.

Dim FANextNumericID As System.EventHandler


Sub Initialize() Implements IDexterityAddIn.Initialize


     FANextNumericID = New System.EventHandler(AddressOf FAGetNextNumericID)
     FixedAssets.Forms.FaGeneralMaintenance.AddMenuHandler(FANextNumericID, "Next Asset ID", "N")


End Sub


Now, in GP you can simply use the Ctrl-N hotkey or select Next Asset ID from the Additional Menu…



… to assign the Next Numeric Fixed Asset ID to new Fixed Asset Record.



Now, not only do you not have to deal with merging Form Modifications and/or VBA code with existing Form Modifications or VBA projects but if there weren't any to begin with you don't have to deal with upgrading them when applying services packs or upgrading.

28 September, 2009

PO Purchases Account Required during PO Entry

After collaborating with another consultant to develop a solution to make the PO Line Purchase Account required during Purchases Order Entry I decide to make this available for general use "AS IS" with no warranties.  You can download the .dll here.  This has only been tested with GP v10.

This wasn't as simple as just making the field required with Modifier since the Purchasing Item Detail Entry window, on which the field is located, does not have to be loaded during PO Entry.  We accomplished the same thing with VBA but decided that the Visual Studio Toolkit for GP was a better option. If you want the VBA code just shoot me an e-mail and I'll send that to you.

The customization works like this:

During PO Entry, before you lose focus from a PO Line for which a Purchases Account was not entered or for which there was not a default value the system will notify you accordingly and stop you from continuing.



This customization will open Purchasing Item Detail Entry and then prevent the window from being closed or the record from being saved until the Purchases Account field is populated.



It's pretty simple but there were a few challenges we had to overcome.  Now, you don't have to!  If you do use it or just check it out leave me a comment and let me know what you think.

23 September, 2009

Advanced RMA for GP is here!

The Advanced RMA (aRMA) Add-on for Dynamics GP will help you to maximize the value of the investment you made in your Dynamics GP solution in a number of ways. This add-on is particularly well suited for manufacturers/distributors and equipment rental companies but has a place in any solution that leverages the Dynamics GP RMA module to service customers. aRMA extends the Dynamics GP RMA Module to accomplish the following goals:

1. Allow lines on a single RMA originating from many SOP Invoices.
     a. Tie the credit amount on each line back to the originating SOP Invoice.
     b. Reduce the number of RMAs issued to customers and that they have to manage.
2. Allow users to Append RMA Lines from varied SOP Invoices to Existing RMAs.
3. Streamline RMA Entry to improve customer service levels.
4. Eliminate waste and redundancy in the RMA entry process.

Installation


The Advanced RMA Entry Addon is installed by loading the AdvancedRMA.dll in the GP\Addins directory on each Dynamics GP Client. That's it! One file on each workstation.  The .dll contains the logic to complete the one-time server install. So, you don't have to run any SQL scripts, create any SQL Logins, etc. All you have to do is log into GP as 'sa' and after selecting "Advanced RMA Entry" from the Additional Menu in RMA Entry Update when prompted with ...

... say "Yes". This will load the one table (DYNAMICS.dbo.mjRegistration) required for this addon. This table tracks registration information only. Otherwise, the add-on leverages Dynamics GP security, standard database objects, and standard business logic for processing.

User Instructions


1. From the "Additional" menu in RMA Entry/Update select "Advanced RMA Entry".





2. In Advanced RMA Entry, enter values into the filter fields; CustomerID, From Item Number, To Item Number, From Date (Invoice Document Date), and To Date (Invoice Document Date).

3. Click "Apply Filter" to display the list of SOP Invoice lines that meet the criteria you've entered. Any Serialized Lines that are already in inventory or on unreceived RMAs will automatically be filtered out of the results.



4. Now, you can sort the results set in the grid then Mark the SOP Line(s) that the customer wants to return.

5. The RMA Qty will default to the Invoice Qty but can be edited for each line.

6. If a line had been previously partially or fully returned the user will be notified accordingly.



7. When the window is opened the RMA Type, Office ID, and Return Site ID are all populated from the RMA Setup Defaults. Before creating the new RMA you can modify those default values, select a Reason Code, and enter a Customer PO Number if necessary.

8. Finally, click "Create RMA" to create a new RMA using the RMA Interface values and SOP Lines selected in Advanced RMA Entry.



9. You will notice that you can drill back to the RMA in RMA Entry/Update from the RMA Number hyperlink. The RMA can be edited, lines added or removed, etc. in the RMA Entry/Update using standard Dynamics GP functionality.



10. After creating a new RMA, additional SOP Lines can be appended to it. Notice that the "Create RMA" label has changed to "Append RMA" and the Customer ID and RMA Interface Fields have all been locked. Modify the other filter options or re-sort the list of SOP Invoices then select additional lines to append to the RMA.



11. Drill back to the RMA again to see the new lines that were selected, modify the RMA as necessary, and even enter additional lines that didn't originate from a SOP Invoice.



It's very simple and efficient!

aRMA was built using the Visual Studio Toolkit for GP. I'll gladly share it with you if you want to try it out. Just e-mail your request to MichaelJ2@gmail.com.

18 September, 2009

GP Technical Conference - early registration ends TODAY!

I know that I'm looking forward to this conference.  It's been too long since I've made a trek through Fargo. I know Mariano and David will knock it out of the park.  Plus, there's the Green Mill!

Message from the Microsoft Dynamics GP Team:

Registration after today is $595. Save $100 by registering today for the Microsoft Dynamics® GP Technical Conference 2009.

It is THE place to learn about “all things” Microsoft Dynamics GP  – the product itself, innovative development tools, best practices and more.  Additionally, attendees will gain technical readiness for Microsoft Dynamics GP 11 and will learn about new features in the upcoming release. There will be numerous opportunities to network and visit with the Microsoft Dynamics GP development, support and leadership teams as well as with other partners.

Highlights include:
·         Interactive concurrent sessions – learn more about the solution from the Microsoft Dynamics GP team
·         Roundtable discussions – visit with a small group over lunch on a variety of topics
·         ISV Expo and reception – learn about the latest add-on solutions
·         Study halls – review specific areas of the solution with experts
·         Post-conference training – gain knowledge on Microsoft Dynamics CRM and xRM

The conference, scheduled for November 9 – 11 in Fargo, North Dakota, will provide insight, skills and knowledge that will help move your business forward. Simply put, the conference is THE place to learn all things Microsoft Dynamics GP. How can you afford not to attend? 

Visit www.microsoft.com/dynamics/fargodeveloperconference for session descriptions, additional details and registration info. And hurry: the discounted registration rate ends on Friday, September 18!

See you in November at THE place for all things Microsoft Dynamics GP!

The Microsoft Dynamics GP Team

P.S. Plan to join us on Thursday, November 12 for a morning of complimentary post-conference training. These concurrent session will focus on Microsoft Dynamics CRM and xRM. Check the conference website for details. You won’t want to miss this … and it’s free!

Visual Studio Tools Integration with GP Security

After reading many blog posts, TK articles, forum threads, and the like I pieced together from many sources how to build Visual Studio Toolkit forms that integrate with Dynamics GP security so you don't have to hard code a connection string or any environment specific settings in your application or .config file.


You'll need to get the GP Connection Library (GPConn.dll) from GP Support.  You have to license the GP Connection object and obtain the keys.  This will enable you to get around the VS Toolkit only exposing the unencrypted password.  Once you have that you can simply use the code snippet below in your project to dynamically connect to the Dynamics GP database using the GP user credentials.

Dim resp As Integer


Microsoft.Dexterity.GPConnection.Startup()


' Create the connection object
GPConnObj = New Microsoft.Dexterity.GPConnection()


' Initialize
resp = GPConnObj.Init("key1", "'key2")


CompanyDB.ConnectionString = "DATABASE= " & Dynamics.Globals.IntercompanyId.Value
GPConnObj.Connect(CompanyDB, Dynamics.Globals.SqlDataSourceName.Value, Dynamics.Globals.UserId.Value,
Dynamics.Globals.SqlPassword.Value)



This is mostly straight from the documentation that accompanies the GP Connection Library from GP Support.  From that, it was easy and convenient to build the connection string using Dynamics.Globals.IntercompanyID for the database and SqlDataSourceName for the SQL Server Instance in the connection string.  The UserID and SQL Password need no explanation.  Now, you can compile your .dll and deploy it to any GP installation without having to worry about any environment specific settings.


I'm sure there are more elegant ways of doing this and this may been clearly documented elsewhere but I didn't find it teed up for me this way.  That would have saved me a little time.  I hope this helps you!