Wednesday, April 8, 2009

Dummy’s Guide to Capturing Log Files Using Support Debugging Tool

I have been a little slow in making good use of the Support Debugging Tool. However, it definitely seems to save considerably more time than it takes in setting up, so I am warming up more.

Now that I have the tool installed at a few places, generating DexSQL.Log, Profile.txt, Srcipt.Log takes just a couple of clicks as you will see below.

Here’s how I did it earlier –

1. Close Dynamics

2. Make Dex.ini Changes to enable logging

3. Log In and Generate Logs

4. Log out

5. Make Dex.ini Change to turn off logging

6. Log Back in

Here’s how I do it when I have Support Debugging Tool

1. Turn on Logging using Tool and Generate Logs

2. Turn off Logging using Tool

First you need to install the Tool (Just Copy the chunk file!)

1. Copy the “Debugger.cnk” file and paste it in the Dynamics GP Installation folder

clip_image002[1]

1. Launch Dynamics and include the new code

clip_image004[1]

2. Support Debugging will be available at Microsoft Dynamics GP >> Tools >> Support Debugging Tool

Generating DexSQL.Log, Profile.txt, Script.Log with just a couple of Clicks

Typically you would want to capture the log associated with a specific action. You should turn on logging just before you reach that state.

1. Turn on Manual Logging by Clicking on the “Turn on” button

Carry out the action you want to log

clip_image006[1]

2. Turn off Logging

clip_image008[1]

You will find the log files in the GP Folder. To ensure that the log files are not overwritten, the User, Company and date and time information are appended to the default file name.

clip_image010[1]

That's it! I especially loved this when the 30 odd minutes I had set aside to capture the logs, ended up being just 8 minutes!

More Information -

Download Link - http://blogs.msdn.com/developingfordynamicsgp/archive/2008/09/03/support-debugging-tool-the-wait-is-over.aspx

Introduction to the Tool By David - http://blogs.msdn.com/developingfordynamicsgp/archive/2008/07/30/support-debugging-tool-for-microsoft-dynamics-gp.aspx

First Look By Mariano Gomez - http://dynamicsgpblogster.blogspot.com/2008/08/first-look-at-support-debugging-tool.html 

Security Profiler and Screenshot Capturing Info by Mariano Gomez - http://dynamicsgpblogster.blogspot.com/2008/12/support-debugging-tool-redux.html

Thursday, April 2, 2009

Customization Status Window

This is a great window to “temporarily” disable a product while troubleshooting. When you log back into the System the Product gets loaded again.

Tools >> Customize >> Customization Status

clip_image002

If you want to permanently disable a product you should update the Dynamics.set file

1. Take a backup of the Dynamics.set file

2. Open Dynamics.Set file in your text editor and remove the files associated with the product. This would normally include the product dictionaries, name and ID.

3. Decrease the count on the first line of file by one.

Tuesday, March 31, 2009

How good an Estimator are you ?

Software estimation is difficult.

At Dynamics GP Land Steve Endow writes about the 30% rule while preparing estimates for Custom Software Development. He talks about how while estimating, its generally a good idea to add 30% extra time to account for risks, changing requirements and overheads. Steve has found this to be practically useful while reviewing budget to actual.

The most interesting thing for me from the post is Steve's point about how often making an accurate estimate means you end up being less competitive compared to firms that are bidding low.

"By presenting a realistic estimate that reflects the likely total cost of the project, you run the risk of giving people sticker shock. Salespeople want to sell the solution at a "competitive" price, which is almost always lower than your estimate. And then there are clients who see the total hours and assess that the estimate is "too high", or simply too expensive for them, killing the project. And if you are bidding against a firm that can't estimate accurately, does not provide a realistic estimate, or simply underbids, your estimate will look much too high, even if it is accurate, thereby damaging your credibility and trust with the client."

Estimation for software projects is a extensive subject in itself. There's a great book by one of my favorite authors, Steve McConnell on this subject - Software Estimation: Demystifying the Black Art (Best Practices (Microsoft))

Something I learnt from the book was how bad majority of us are at making good estimates. Go ahead and take a quick 5-10 minute quiz from the book to find out how good you are at estimation.

So how good an Estimator are you ?

It might be an eye-opener.

Monday, March 30, 2009

Why User Classes are still relevant in GP 10

Mark Polino writes about how User Classes are STILL relevant in GP 10. They are used in Organizational Structures and thereby Account Level Security.

http://msdynamicsgp.blogspot.com/2009/03/weekly-dynamic-dynamics-gp-10-roles-vs.html

Friday, March 27, 2009

Visual Studio Tools for Dynamics GP - Resources

Getting Started ?

Visual Studio Tools SDK for Microsoft Dynamics GP 10.0 - SP3 is out as of today, which supports VS 2008. You will need VS 2005 SP1.

If you get the error -".Net Framework 2.0 not detected", and you know you have .Net 2 installed, install the SDK from the SP2 download, where this error has been fixed.

Developer Toolkit Samples - There a couple of nice applications, that you can build on.

a) Field Defaulter - Uses events to default City and State fields when a user enters a ZIP code in Customer Maintenance

b) Estimate Freight - Estimates Freight Amounts for Sales Documents and fills it in the Sales TRx Entry Window.

Developer Toolkit Resources at Developing for Dynamics GP Blog

Need help ?

VS Tools Forum by Steve Gray - Excellent Resource for all VS Tools related troubleshooting and questions . 

Microsoft GP Developer Newsgroup

Tips and Tricks

Menus for Visual Studio Tools for Microsoft Dynamics GP 10.0 by David Musgrave and GP Developer Team- Add-On which helps in adding Menu items to GP Menu and to add your a form directly to the menu. This has been a great solution to one of the complicated parts of developing apps with VS Tools.

Reading a config file with VS Tools by Dave Dusek- Extremely helpful in adding custom switches for your app so you can make changes on the fly in your app.

Code For Centering the Add-In Windows on Screen regardless of Resolution by Mohammad Daoud

Monday, March 16, 2009

AA Table Changes in GP 10 SP2 / Feature Pack - Update

Last month, I had written about the table changes in AA after GP 10 SP2.

Below are some more details, which might help those of you who have custom reports reading data from Analytical Accounting. Thanks to Rubal for detailing these out.

Earlier there were only AAG3XXXX series of tables for AA codes with GL Transactions. They contained data for both Open Year and Historical Year data.

Now, the Open Year and Historical Year data is stored in different tables. For Historical Years data AAG4XXXX series of tables have been added. 

There is one historical table corresponding to each open table. Example - For table AAG30001, new table AAG40001 has been added for historical data.

 

New Table Name

Corresponding Table for Open Year Data

Description

AAG40000

AAG30000

This is the Header table. It contains Journal Entry number and AAHdrID

AAG40001

AAG30001

 Account Distribution of transactions

AAG40002

AAG30002

 Assign Percentage details for the transactions

AAG40003

AAG30003

 Dimension Codes used with the transactions

 

 

Tables in GP

clip_image002

New tables Added for AA Alias

Aliases for Dimension codes was a cool new feature that was added in the Feature pack. (Create a grouping of Analytical Accounting Transaction Dimension codes as defaults when entering analytical information on a transaction similar to the account alias in General Ledger. A default combination of transaction dimension codes will help increase speed and accuracy for data entry and enable users to create more than a single set of defaults for the transaction dimensions.)

This information is stored in:

New Tables

Display Name

Technical Name

Physical Name

AA Alias master

aaAliasMstr

AAG00800

AA alias transaction Dimension Code

aaAliasTrxDimCode

AAG00801

 

Modified tables:

 

Physical Name

Modification

AAG30002

aaAliasID field added

 

Tuesday, March 10, 2009

AA Error : "Cannot insert duplicate key in object"

If you are using Analytical Accounting and get the error which is something like "[Microsoft] [SQL Native Client] [SQL Server] Violation of PRIMARY KEY constraint 'PKAAG20003.' Cannot insert duplicate key in Object 'AAG20003'."

The table name could be different.

Your first steps should be to check out KB article "897280" which has a script to fix this error. This should solve the problem 90% of the times.

However,  if you still get the error, this means the numbers are correct in the AAG00102 table and a duplicate key error is often caused by an invalid record in the AAG2000X  series of tables.

Run the following script against your company database -

select * from AAG20000 where aaSubLedgerHdrId = 0

select * from AAG20001 where aaSubLedgerHdrId = 0

select * from AAG20002 where aaSubLedgerHdrId = 0

select * from AAG20003 where aaSubLedgerHdrId = 0

If you get any results - those are the entries causing the problem. The 0 in the aaSubLedgerHdrId is not a valid record since the next number needs to come from the AAG00102 table. 

Hope that helps!