Problem Adding Fields To VBA in Microsoft Dynamics GP 2013 R2

Microsoft Dynamics GPI had a colleague (actually the First Minion, Erebus) using Modifier with VBA to create a customisation of the Account Maintenance window (Financial area page >> Cards >> Account) in Dynamics GP 2013 R2 (for a client who does not and will not be using the web client). This customisation required a small number of fields and the save button to be added to VBA.

When he was adding the fields everything was fine, but as soon as he tried to add the save button the cursor changed to a standard one and did not allow the save button to be added. Microsoft Dynamics GP 2013 R2 saw the introduction of the action pane (or ribbon bar as I keep on calling it):

Account Maintenance action pane

Continue reading

File Not Found: VBA6.DLL

While VBA is falling out of favour with Microsoft Dynamics GP (by dint of not being supported in the web client) it is still useful for those clients who do not use, and have no intention of using, the web client.

One such client was recently installing some new XenAPp servers using Windows Server 2012; when they tried to open a window with a VBA customisation they received the following error:

File Not Found: VBA6.DLLFile Not Found: VBA6.DLL

Fortunately, Beth Gardner posted the answer to the Developing for Dynamics GP blog.

Review of Microsoft Dynamics GP 2013 Reporting by David Duncan and Christopher J Liley

I have received a copy of the newly published Microsoft Dynamics GP 2013 Reporting, by David Duncan and Chrisopher J Liley, from Packt Publishing to review. This is an update of a previous book the pair wrote for Microsoft Dynamics GP 2010:

Microsoft Dynamics GP 2013 Reporting

The book covers an extensive range of the reporting tools in, or available with, Microsoft Dynamics GP 2013:

  • SmartList Builder including Excel Report Builder
  • Report Writer and Word Templates
  • Reporting Services Reports
  • Analysis Cubes
  • Management Reporter

Continue reading

VBA Compile Error – Expected: expression

I realise that the use of VBA in modifications and customisations is something that needs to be carefully considered with Microsoft Dynamics GP 2013 including a Silverlight based Web Client which cannot use VBA. I had a requirement from a client for a modification to the Debtor Enquiry (Customer Inquiry to the Americans reading) to include the sum of the displayed transactions on the window and as this was a small client with GP installed locally on each PC there is no requirement for the web client, I felt able to perform this change using Modifier using some VBA.

I added the required fields to the VBA project but encountered an error message when writing the VBA code to concatenate the fields into the SQL statement I was going to use to get the data;

Microsoft Visual Basic: Compile error: Expected: expressionMicrosoft Visual Basic: Compile error: Expected: expression

Continue reading

Review of Developing Microsoft Dynamics GP Business Applications – Part 1

At the end of December, Developing Microsoft Dynamics GP Business Applications, written by Leslie Vail and published by Packt Publishing was released.

Developing Microsoft Dynamics GP Business Applications by Leslie Vail

I got a copy of the book in order to do a review and have decided to break the review down into multiple parts. The reason for this is that the book includes some practical examples which I have decided to do and then include the results of this in the review; after all if it is a book on developing how can you accurately review the book if you don’t use what you learn to build something?

The book is aimed at developers new to working with Microsoft Dynamics GP, so bear in mind that I am not a developer when reading my reviews. Quick synopsis of my background: I started my career as a trainee developer and moved through a variety of roles such as developer and support analyst before moving to my current position as consultant and project manager.

I oversee development teams working on additions or amendments to Microsoft Dynamics GP as well as personally undertaking some modifications using Report Writer or Modifier with VBA. So despite not being a developer, I am used to working with them and did, once upon a time, be one myself.

The first chapter of the book covers the Microsoft Dynamics GP Architecture from a high level perspective.

It covers the history of the GP interface from it’s origins with Great Plains Software, an overview of Dexterity and the development environment. There is a detailed explanation of the launch file (Dynamics.set), which included a couple of points of which I wasn’t aware, and the configuration/preferences file (Dex.ini).

The explanation of the Dex.ini file included the ExportOneLineBody switch which I didn’t know about, but for which I have an immediate use.

Leslie then goes on to explain about the structure of the tables in the SQL Database which always strikes newcomers as arcane and overly complex. Leslie explains this well with plenty of detail on both the structure, including both the physical and technical names, and how transactions move between tables as their state changes.

Chapter 1 wraps up with a detailed explanation of the UI covering how forms are constructed, how the scrolling windows work and the common buttons used on forms, scrolling windows and individual buttons.

The second chapter of the book focuses on the fundamentals of integrating applications with Microsoft Dynamics GP.

Continue reading

Developing Microsoft Dynamics GP Business Applications by Leslie Vail

A new Microsoft Dynamics GP book, by Leslie Vail is now available from Packt Publishing.

This book will teach you how to create and customize Dynamics GP Applications by taking you through the initial steps of setting up a development environment through to customising and developing an example application using tools such as Dexterity, Visual Studio Tools and sanScript starting with an overview of Microsoft Dynamics GP architecture.

Developing Microsoft Dynamics GP Business Applications by Leslie Vail

Continue reading

Prevent Change Of User Date

Fred Webb posted a question on the Dynamics GP Community Forum asking if it was possible to prevent the User Date being changed in Dynamics GP 2010.

One response was to use Field Level Security which would work but seems a little excessive. I had a think on alternatives and, because we’re dealing with GP 2010, the one I came up with was to prevent the User Date window being opened by using a little VBA.

The package for Microsoft Dynamics GP 2010, which also works for Microsoft Dynamics GP 2013, can be downloaded at the bottom of the post.

The VBA I used was:


Private Sub Window_BeforeActivate()
   Me.Close
End Sub

Private Sub Window_BeforeOpen(OpenVisible As Boolean)
   Me.Hide
End Sub

Me.Hide causes the UserDate window to be hidden from the user as it starts to open, and Me.Close forces it to close.

I could have put both the Me.Close and Me.Hide in the sub Window_BeforeOpen, but I found the main GP window didn’t get focus back. By splitting the Me.Close into Window_BeforeActivate focus was returned to GP when the UserDate window was closed.

The downside of using VBA asa solution is that it will not work with the Microsoft Dynamics GP 2013 Web Client, although it will work with the standard 2013 client.

[wpdm_file id=5]

Microsoft Dynamics GP SmartList Default Visible To Company

In July, as part of his weekly MS Connect suggestion series, Mark Polino raised the issue of SmartList Favourites and the default Visible To which is set to System.

Mark’s suggestion was to have the default changed to User which would leave a generally tidier list. To be honest I’d rather have a setting which allowed the default to be chosen by each client. The reason for this is we’re currently in the middle of an upgrade project where a few Microsoft Dynamics GP systems will be merged into one and it would be good to have the default Visib le to set to Company.

Following on from my recent post on a fixed width SmartList left pane I decided to have a fiddle and see if I could force the default to something else. And it turns out with some simple VBA that you can do exactly that;

SmartList

Continue reading

Microsoft Dynamics GP 2013 SmartList Fixed Width Left Pane

In July last year, Frank Hammelly posted a SmartList customisation for Microsoft Dynamics GP 2010 on his blog gp2themax.

I’ve recently been taking a look at Microsoft Dynamics GP 2013 and decided to see if I could use Modifier to reproduce this customisation for GP 2013 (I have no reason to believe the customisation posted by Frank won’t work with 2013, but I wanted to dabble with Modifer and this seemed a good starting point); the customisation can be downloaded at the bottom of this post.

The screenshots below show SmartList in both it’s default size and maximised with the left pane remaining a static size and the right pane occupying the rest of the window;

SmartList

Continue reading

VBA Customisation To Microsoft Dynamics GP 2013 Login Window To Display Desktop Alert If Caps Lock On

In 2009 Patrick Roth, on the Developing for Dynamics GP blog, posted a customisation for the Microsoft Dynamics GP login window which displays a message box if the caps lock is on when the user goes to enter their password.

Then, back in July, Aaron Berquist on his blog High Dynamic Range, posted an article on using VBA to create a desktop alert to users which doesn’t take focus away from the application.

I decided to take a look and see if I could combine these two ideas into one and have a desktop alert displayed when the user has caps lock on when logging in, which is far less intrusive than the message box approach by Patrick.

The result is a customisation of the login window (which you can download at the end of the post) to display an alert if the user has the Caps Lock on using the desktop alert code Aaron posted.

The code displays a message to the user if they have Caps Lock on when the login window displays, or when they tab into the Password field if they haven’t already seen the message;

Desktop Alert

The customisation was created in GP 2013 and has only been tested in this version of GP but has been tested on Windows Server 2008 R2 and Windows 8. As with everything I post here, it is supplied entirely without warranty and you use it at your own risk.

However, if you do have problems let me know and I’ll see what I can do to fix them.

[wpdm_file id=2]