Thursday, October 29, 2009

New Article on MSDynamicsWorld.com: Microsoft Dynamics GP Hybrid Applications Development

A few days aback I did a review of hybrid application development from a technical perspective, my new article on MSDynamicsWorld takes a look at the hybrid approach from a business perspective. Take some time to read the article and let me know what you think.

Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com

Monday, October 26, 2009

Top Ten Reasons to attend the Microsoft Dynamics GP Technical Conference 2009


















If you are not already registered to attend the Microsoft Dynamics GP Technical Conference 2009 and you need some help making your decision to come visit Fargo, the center of the Microsoft Dynamics GP world; then the video below will have you clicking on the link above to register in no time.




Say no more... Just click to register.

Hope to see you all there.

Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/

Monday, October 19, 2009

VST - Amount in Words on SOP Entry window

Background

Just recently, I came across a Microsoft Dynamics GP Partners forum question, requesting the ability to add the amount in words to the SOP Entry window and possibly other windows throughout the system. Certain requirements may seem very strange to some of us, but are based on actual customer requests elsewhere on this planet.

The proposed solution

As I have been lately talking about hybrid integrating applications development, I thought it would be more than appropriate for this occassion to show how this customization could be achieved with the use of Modifier and Visual Studio Tools for Microsoft Dynamics GP. The idea? Pretty simple! Add a text field to the SOP Entry window with Modifier, then build a forms dictionary application assembly with the Dictionary Assembly Generator that can be accessed from Visual Studio Tools. In Visual Studio, I would then create a Dynamics GP project that would reference the Application.Dynamics.ModifiedForms.dll to set the document amount in words to the text field added with Modifier, by calling the Report Writer function RW_ConvertToWordsAndNumbers. If this sounds all too complicated, I will show you how to build this customization in 4 steps.

1. Modify the SOP Entry form to include a local text field. The following screenshot shows the modified window with the text field, '(L) Amount In Words'. Don't forget to grant yourself security to the modified window in Dynamics GP.





2. Use the Dictionary Assembly Generator (DAG.EXE) tool provided with Visual Studio Tools to generate the Application.Dynamics.ModifiedForms.dll application assembly for the forms dictionary. Since DAG.EXE is a command line utility, go to the command prompt then go to the Visual Studio Tools SDK folder (typically under Program Files\Microsoft Dynamics\GP10 VS Tools SDK) to execute it, as follows:

dag.exe 0 "C:\Program Files\Microsoft Dynamics\GP\Dynamics.set" /F /N:Dynamics

3. Open Visual Studio and create a new Dynamics GP solution, SOPAmountInWords.



Once the solution has been created, you can proceed to add a reference to the forms dictionary application assembly.



Now you can proceed to add the following code in the editor:


// Created by Mariano Gomez, MVP
// No warranties conferred, express or implied
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using Microsoft.Dexterity.Bridge;
using Microsoft.Dexterity.Applications;
using Microsoft.Dexterity.Applications.DynamicsModifiedDictionary;

namespace SOPAmountInWords
{
public class GPAddIn : IDexterityAddIn
{
// IDexterityAddIn interface
const short FUNCTIONAL = 1;
const short ORIGINATING = 2;

SopEntryForm sopEntryMod;
Microsoft.Dexterity.Applications.DynamicsDictionary.SopEntryForm sopEntry;

public void Initialize()
{

// create overload method for changes in the document total field
sopEntry = Dynamics.Forms.SopEntry;
sopEntry.SopEntry.OriginatingDocumentAmount.Change += new EventHandler(OriginatingDocumentAmount_Change);

}

void OriginatingDocumentAmount_Change(object sender, EventArgs e)
{
string amountInWords;

// retrieve amount in words
if (sopEntry.SopEntry.CurrencyViewButton.Value == ORIGINATING)
{
amountInWords = Dynamics.Functions.RwConvertToWordsAndNumbers_.Invoke(
sopEntry.SopEntry.OriginatingDocumentAmount.Value,
sopEntry.SopEntry.CurrencyId.Value,
0
);
}
else
{
amountInWords = Dynamics.Functions.RwConvertToWordsAndNumbers_.Invoke(
sopEntry.SopEntry.DocumentAmount.Value,
sopEntry.SopEntry.CurrencyId.Value,
0
);
}


// assign value to custom text field on modified form
try
{
sopEntryMod = DynamicsModified.Forms.SopEntry;
sopEntryMod.SopEntry.LocalAmountInWords.Clear();

sopEntryMod.SopEntry.LocalAmountInWords.Value = amountInWords;
}
catch (Exception ex)
{
MessageBox.Show("Error attempting to set modified form field value: {0}", ex.ToString());
}

}
}
}



Code Explanation

The first aspect of the code is to reference the namespace of the modified form applciation assembly. This will allow us to access the modified form object, SOP Entry. As a best practice, and to avoid working with extremely long object namespaces, I created two variables that reference the objects I need to work with. In addition, I defined two constants that will check whether the amount is being displayed in functional or originating currency as the wording will need to change accordingly.


using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using Microsoft.Dexterity.Bridge;
using Microsoft.Dexterity.Applications;
using Microsoft.Dexterity.Applications.DynamicsModifiedDictionary;

namespace SOPAmountInWords
{
public class GPAddIn : IDexterityAddIn
{
// IDexterityAddIn interface
const short FUNCTIONAL = 1;
const short ORIGINATING = 2;

SopEntryForm sopEntryMod;
Microsoft.Dexterity.Applications.DynamicsDictionary.SopEntryForm sopEntry;


In the Initialize() method, we will register a change event on the Originating Document Amount field, in turn Visual Studio will create the proper overload method that we will use to add the code to manage the display of the amount in words.


public void Initialize()
{

// create overload method for changes in the document total field
sopEntry = Dynamics.Forms.SopEntry;
sopEntry.SopEntry.OriginatingDocumentAmount.Change += new EventHandler(OriginatingDocumentAmount_Change);

}


In the OriginatingDocumentAmount_Change() method, we now can add the code to manage the display of the amount in words by invoking the RwConvertToWordsAndNumbers_() function, exposed via the Microsoft.Dexterity.Applications namespace (Applications.Dynamics.dll application assembly)


void OriginatingDocumentAmount_Change(object sender, EventArgs e)
{
string amountInWords;

// retrieve amount in words
if (sopEntry.SopEntry.CurrencyViewButton.Value == ORIGINATING)
{
amountInWords = Dynamics.Functions.RwConvertToWordsAndNumbers_.Invoke(
sopEntry.SopEntry.OriginatingDocumentAmount.Value,
sopEntry.SopEntry.CurrencyId.Value,
0
);
}
else
{
amountInWords = Dynamics.Functions.RwConvertToWordsAndNumbers_.Invoke(
sopEntry.SopEntry.DocumentAmount.Value,
sopEntry.SopEntry.CurrencyId.Value,
0
);
}


// assign value to custom text field on modified form
try
{
sopEntryMod = DynamicsModified.Forms.SopEntry;
sopEntryMod.SopEntry.LocalAmountInWords.Clear();

sopEntryMod.SopEntry.LocalAmountInWords.Value = amountInWords;
}
catch (Exception ex)
{
MessageBox.Show("Error attempting to set modified form field value: {0}", ex.ToString());
}

}

Note that the value of the CurrencyViewButton is checked to establish whether to display the amount in functional or originating, but also use the correct currency wording (dollars/cents, pounds/pensks, etc).

The Report Writer function is then called with the required parameters. Then the result is assigned to our exposed text box field.

4. Now we can build and deploy the solution. Copy the resulting application assembly to the AddIns folder under the GP installation folder. Launch Dynamics GP and go to the SOP Entry screen. You can enter a new document or browse through existing ones as the customization will fill in the text box appropriately.



Hopefully you enjoyed this simple and useful customization and learned a bit more about developing hybrid applications.

Downloads
You may download the zip file containing the Visual Studio solution, application assembly and package file with the customization. To install, copy the Application.Dynamics.ModifiedForms.dll and the SOPAmountInWords.dll files to the AddIns folder under Dynamics GP. Import the package file and grant yourself security to the modified SOP Entry window.

SOPAmountInWords.zipx - Click here to download

Until next post!

MG.-
Mariano Gomez, MIS, MCP, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/

Saturday, October 17, 2009

The Technology Corner - Microsoft Office 2010 The Movie

Anyone who thought Microsoft could not compete with big time Hollywood productions, think again! All you need to do is take a look at this uber-spectacular video for the upcoming release of Microsoft Office 2010 circulating on YouTube.


URL: http://www.youtube.com/watch?v=VUawhjxLS2I

The trailer production was contracted out to Director Dennis Liu who also has the short on his site. If only they would develop the movie... it would be the most hilarious thing ever. For more Microsoft Office 2010 videos, visit the official back stage site at http://www.office2010themovie.com/. You will learn about all the features being incorporated into the product from the people who made it possible.

Until next post,

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/

Monday, October 12, 2009

Developing Microsoft Dynamics GP hybrid integrating applications

As I prepare for the 2009 Microsoft Dynamics GP Technical Conference, one of the topics that keeps coming across the sample applications we are planning on showcasing to the attendees and frankly, something that David Musgrave and I have been informally publishing and talking about for quite some time now is the topic of hybrid integrating applications development.

Simply put, in the world of Software Development the Earth doesn't always revolve around the Sun. In fact, in the world of Software Development, there are times when the Sun and other planets may need to revolve around the Earth. This is, as a developer your solution becomes the center of the Solar system and all resouces at your disposal work to make that solution robust and to meet the requirements established by your customer -- customer used here in the broad sense of the word.

Hybrid application development involves using multiple development tools and techniques to make your solution a viable one. In the case of the Dynamics GP development, those development tools involve the use of Microsoft Dexterity, Visual Basic for Applications (VBA), and Visual Studio Tools for Microsoft Dynamics GP. In today's world, to think that one tool is enough to build an application is ludocrus (take this from the Microsoft Dexterity developer in me). In fact, as the Microsoft Dynamics GP application suite continues to expand its use of managed code, using one tool to deliver a solution is becoming very (if not extremely) limiting!

A hybrid development approach will then allow you to take advantage of the best features available with each tool. A Microsoft tool that best represent this hybrid approach in the Dynamics GP space is Menus for Visual Studio Tools for Microsoft Dynamics GP -- save the joke about the name... MVP Mark Polino once called this the longest name for any Microsoft product -- VSTM for a short, uses Microsoft Dexterity to expose a menu managing API that allows Visual Studio developers to add their customizations to Microsoft Dynamics GP standard menu structure.

A hybrid development approach can be use for even VBA customizations, where you need to run Microsoft Dynamics GP internal functions and procedures. By now, many of you may have explored running Dexterity sanScript code from your VBA customizations with the Dynamics Continuum Integration Library... yeah, yeah, I have also heard the claims and place the disclaimers myself about supportability of this approach. You may even be taking advantage of calling .NET assemblies from Dexterity. In fact, your Visual Studio Tools solutions are by nature hybrid, since they take advantage of Microsoft Dynamics GP resources that are accessed via .NET assemblies.

Hybrid development forces developers to broaden their knowlege of tools and leave their comfort zones, but I firmly believe it makes for better integrating application solutions.

Related Articles

Sample Hybrid Customizations @ Developing for Dynamics GP
VBA - Creating a keyboard shortcut for a Microsoft Dynamics GP window expansion button
This week, free Visual Basic for Applications workshop with the Dynamics GP Blogster
Using Menus for Visual Studio Tools from VBA - Calling native VBA forms
How to display existing record notes on an existing Dynamics GP window with Modifer and VBA
Using pass-through sanScript in VBA to return a file path to a Dynamics GP Modified form field

Until next post!

MG.-
Mariano Gomez, MIS, MCTS
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com

MVP Headlines at Dynamics Conference

The Microsoft MVP Award Program blog has a stub running today on my appearance at the 2009 Microsoft Dynamics GP Technical Conference in Fargo, ND. If you are planning on attending the conference, please don't forget to register. There are still plenty of seats open and you can still get some decent hotel rates around town. The Conference will be held from November 9th - 11th, with an entire day of post-conference training FREE!!

Don't miss out on this great opportunity to meet some of your fellow peers doing the technical heavy lifting in the trenches. A big reason why these conferences are successful is because you have the ability to interact with other people who understand your pains and may even give you a tip or two on how to tackle your issues.

Until next post,

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/

Tuesday, October 6, 2009

The Technology Corner - Microsoft Office 2010 and Microsoft Dynamics GP v10

Thanks to the MVP Award Program, I got a hold of Microsoft Office 2010 Professional Technical Preview. While the Technical Preview copy has been out since the beginning of July via Microsoft MVP Connect Services, I have just come around to installing it and testing the traditional Dynamics GP operations with SmartLists and Navigation Lists. I have to say I am pretty impressed, but before we get there, let's take a look at a few Microsoft Office 2010 improvements.

The New Startup Splashes

Well, the old saying has it that "food enters through the eyes" and Office 2010 is not the exception. Microsoft has departed from the old boring splashes to some really modern polychromatic animated art. Here are a few artworks for some of the most recognized products within the suite.










The installation process went pretty smooth and I was surprised to see all my Microsoft Office 2007 components upgrade without a hitch. Visio continues to be provided as a separate install, but even this wasn't a deterrent to installing the product. The startup process for all these applications is fairly fast when compared to previous versions of Microsoft Office, even the 2007 version.

The Features

Microsoft Office 2010 is jam-packed with new features, but hear it directly from the Microsoft Office Product Management team.


See What's New in Microsoft Office 2010


See What's New in Microsoft Excel 2010


See What's New in Microsoft Word 2010


See What's New in Microsoft Outlook 2010


See What's New in Microsoft PowerPoint 2010


See What's New in Microsoft SharePoint Workspace 2010 (Formerly Microsoft Off...

Microsoft Dynamics GP

I am currently running Microsoft Dynamics GP v10 Service Pack 4 on Windows 7 Enterprise. Upon launching Dyanamics GP I thought I would encounter my first issue with the Home Page perhaps not being able to address the new version of Microsoft Outlook 2010 components.

However, it seems that Microsoft Office development team made a concious effort to preserve the COM automation interfaces for compatibility with other applications that have come to rely on these objects. Next step involved testing SmartList exports to Microsoft Excel 2010 and Microsoft Word 2010. I went ahead and selected the Account Summary SmartList and click the Export to Excel button. The test completed successfully as shown in this video:

video

Microsoft Office 2010 - The Movie

Finally, I leave you with a really cool teaser released on YouTube. I am sure more of these will pop up as the release date approaches.




If you are currently participating in the Microsoft Office 2010 Technical Preview please feel free to add your comments to this post sharing your experiences. In particular, if you are testing Microsoft Dynamics GP with the Technical Preview, I would like to know of your findings.

Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/

Friday, October 2, 2009

Microsoft Small Business Summit Online

This one comes a little late, but I found some really cool videos of the Microsoft Small Business Summit Online over at Microsoft's new partner, Yahoo! This summit was apparently done in 2008, but the material could never be outdated.


@ Yahoo! Video

I rescued these two Dynamics GP videos from the pack. The first is a presentation from Rich Miller, Sr. Product Marketing Manager and Trevor Gilchrist, Technical Product Specialist demonstrating the rich capabilities of Dynamics GP.



Business Management Software and Increasing Productivity @ Yahoo! Video

The second video provides a Customer Case Study and their considerations for switching out their Manufacturing system and replacing it with Microsoft Dynamics GP.


Financial Management with Dynamics GP Accounting Software @ Yahoo! Video

Visit the Microsoft Small Business Summit site for more information on upcoming summits.

Trivia: Did you know they are more than 1000 videos online demonstrating varios capabilities of Microsoft Dynamics GP?

Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com

Thursday, October 1, 2009

More on OLE attachments and record notes

Microsoft's David Musgrave takes on OLE attachments and record notes based on a support case he tackled recently. David reviews the process use by Dynamics GP to retrieve the next note index value and how the system associates the note to a record. He explores the OLE container and how the file names are encoded along with the path.

Furthermore, he provides some Dexterity and SQL code to demonstrate how you would retrieve the hexadecimal value used to compose the notes file name. Be sure to read David's article to get the complete scoop.


Related articles

All About the Dexterity OLE Container - click here
Understanding Notes and the Note Index Field @ Developing for Dynamics GP, click here

Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/

MVP Frank Hamelly's gptip42day

Folks, if you are not taking advantage of MVP Frank Hamelly's gptip42day daily columns featured in his gp2themax blog, you are missing out on some of the best "from the trench" tips you will ever find (Mark, your "50 tips in 50 minutes" are very good too, so no offense).

Frank explores some of the hidden, dark secrets of Microsoft Dynamics GP in a friendly manner and presents real life examples of their usage and how they affect your daily work. Kudos to Frank!

Until next Post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com

Congratulations to Mark Polino, MVP!

"I would do this stuff without recognition from anyone..."

Dynamics GP MVP Mark Polino has been granted another clean bill of health by Microsoft, renewing his current status as MVP for the 2010 year. Mark has been a regular contributor to the Microsoft Dynamics GP user community newsgroups, the Microsoft Dynamics GP partner forum, and has been featured as one of the Microsoft Dynamics Top 100 most influencial professionals in 2009. Mark also runs one of the most succesful blogs in the community, DynamicAccounting.net, where he is constantly featuring articles around the Dynamics blogosphere and his customary columns, Weekly Dynamic and Weekly Review.

Be sure to stop over at DynamicAccounting.net and congratulate Mark for his MVP renewal achievement.

Related Links

The Microsoft MVP Award Program Blog - Click here.

Until next post,

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/