| ID: | 9828 |
| Title: | Avoid some GP Form Modifications with VSTools |
| URL: | http://mbsguru.blogspot.com/2009/09/avoid-some-gp-form-modifications-with.html |
| Description: | 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… http://mbsguru.blogspot.com/atom.xml |
| Category: | DEVELOPMENT: VS Tools |
| Link Owner: | |
| Date Added: | June 17, 2010 05:10:18 AM |
| Number Hits: | 6 |