Tag Archives: Great Plains

Modifier w/VBA – an example

I’ve had people ask me why they would ever need the Modifier tool, and what use is VBA in enhancing Dynamics GP? Well, it has come in quite handy over the years.  This is one example of a customer request where Modifier and VBA were the perfect tools for the job.

The Modifier is a tool that allows users to make simple visual changes to Dynamics windows, for example moving fields around or removing unused fields from the user space.  VBA can be used in combination with the Modifier to add to existing Dynamics logic or sometimes stop the logic from occurring, for example when someone clicks a button on the window.

Disclaimer: this article assumes a degree of experience with the tools, or at least an adventurous spirit… so if you’re the type of person who can take an example and run with it, this is for you!

Following is the request I received from my ideal customer (You gotta love a customer who provides screenshots and mock-ups of their desired outcome!):

 Slide1

Slide2

 

As I said, a perfect scenario for a Modifier/VBA solution, so here’s how I addressed it step by step.  This particular customer has a systems analyst who administers their Dynamics GP environment, so these are the instructions I gave him.

1.  Open the IV_Item_Inquiry window in modifier

2.  Add a button for internet info. I named this PB_World, but it can be called anything. Just change the vba references below to your field names.

3.  Doubleclick the Field field in order to open the definition window and click the elipse (…) to set the graphic to the appropriate one (see below)

Capture1

Capture2

4.  Add another button for the backordered link

Capture3

5.  This one will be set to invisible, but leave it displayed until the testing is completed

6.  The Backordered text field can be changed to be blue and underlined using the properties box. This will make it consistent with the other hyperlink fields on the window.

7.  Once those are done, open the modified window in GP and add it to VBA (if it’s already in the VBA project, you only need to add the two new fields that you created) – this example is in version 10, but the window should look the same.

Capture4

8.  Once you’ve added those two fields from the item inquiry window, you’ll need to add the internet information window to VBA too, along with the appropriate fields:

Capture5

9.  Open the sales item inquiry window and add the appropriate fields from there:

Capture6

10. Finally, insert this code in the VBA project:

Private Sub PBWorld_AfterUserChanged()
InternetInformation.Open
InternetInformation.SelectInformationfor.Value = 4
InternetInformation.MasterID = ItemInquiry.ItemNumber
End Sub
Private Sub PushButtonM20_BeforeUserChanged(KeepFocus As Boolean, CancelLogic As Boolean)
SalesOrderProcessingItemIn.Open
SalesOrderProcessingItemIn.Include = 96
SalesOrderProcessingItemIn.Items = ItemInquiry.ItemNumber
SalesOrderProcessingItemIn.Redisplay.Value = 1
End Sub

 

In order to deploy to additional clients, simply copy the Dynamics.vba from that installation to the other workstations and you should be good to go.

Note: I had to experiment with the selection on the sales order processing item inquiry window to get to the 96 value. so it may be necessary to try various values to get the correct selection for your project.

Advertisement

Leave a comment

Filed under Microsoft Dynamics, Modifier, VBA

Demystifying Dynamics GP: Welcome to Dynamics World

A lot of people have been using Microsoft Dynamics GP (formerly Microsoft Business Solutions, formerly Great Plains) for many years, so you’ve already encountered corrupt reports dictionaries.  You know what to add to the Dex.ini in order to create troubleshooting logs.  You can say “been there, done that” when the error dialog box pops up with an ODBC or SQL error. You may even remember hearing “Welcome to Dynamics” when you logged in (it’s been awhile, but I do recall having a customer that wanted to change the voice so it sounded like Antonio Banderas instead of that pleasant woman…)

But for those of you who are new to the Dynamics GP world, this is an introduction to underlying architecture which I hope will explain some of the issues reported every day and help you resolve them.  I like to think of it as the Dynamics rendition of the good, the bad, and the ugly: The DIC, the EXE, and the SET.

Continue reading

3 Comments

Filed under Microsoft Dynamics