28 December, 2011

Dynamics GP ActiveX component can't create object run-time error 429

Recently I was asked to look into an error a client was receiving while standing up a new Citrix server installation for their Dynamics GP 9 clients:


NOTE: If you are recieving this error while attempting to upgrade from Dynamics GP 9 to Dynamics GP 10, see this article.

When we hit the debug button to look at the underlying VBA code, we saw this line:

Based on the line of VBA code above, I knew that a connection to a database was needed, and the RetrieveGlobals9.dll was not installed on the new Citrix server. You might see slightly different code in your VBA, but the important part was that it was trying to call CreateObject on RetreiveGlobals9.

The first step to solve this problem was to download a copy of RetrieveGlobals9.dll from Partner Source at this URL.

Contact your partner to download this for you if you don't have access to Partner Source. Place the file into the Microsoft Dynamics GP folder in the Program Files directory. Since this was a 64-bit machine, the Microsoft Dynamics GP folder was in Program Files (x86).

Next, open a command prompt in elevated mode.

Finally, to register the .dll, type:
Regsvr32 "C:\Program Files (x86)\Microsoft Dynamics\GP\RetrieveGlobals9.dll"

You will need to include the quotes because the directories have spaces in them.

If everything worked properly, you'll receive a confirmation that the .dll was registered successfully.



After these steps were complete, we were able to open and use Microsoft Dynamics GP without receiving the initial VBA error.

Hope it helps!
Bryan Prince







28 August, 2011

Record Lock Trace v 2.0

I've updated the Lock Trace Utility for Dynamics GP with 2 new features.

The first enhancement will replace the standard "This batch is being edited by another user" prompt when attempting to post or delete a SOP Batch with the name of the user that has the batch locked with an activity record in SY00800.


The second enhancement will clear all records that are locked by users that are not actively logged in to GP.  This will be executed when attempting to access a transaction locked by a user that is not actively logged in.  After, the record will be available and the following prompt will be presented.


The basic delete statements executed by this feature are listed below:

delete tempdb.dbo.dex_lock where session_id not in (select SQLSESID from dynamics.dbo.activity)
delete tempdb.dbo.dex_session where session_id not in (select SQLSESID from dynamics.dbo.activity)
delete DYNAMICS.dbo.SY00800 where userid not in (select USERID from DYNAMICS.dbo.activity)

If you are not sure what version of the utility you have installed, since there isn't a GUI, I've updated the about message to include the version information.


Download Record Lock Trace for Dynamics GP here or view the product page for more information.  Please leave a comment if there are other features or transaction types that you would like added to this utility.

09 August, 2011

Reconciling SOP Batches from WITHIN Dynamics GP

An article I posted sometime ago with a SQL Script that would reconcile SOP Batch Totals has really developed legs recently.  It's been downloaded several times a week for several months.  As a result, I felt some enhancement was in order.

To that end, I've compiled the same logic, with few exceptions, into an assembly you can download here.  Copy this to your Addins folder and then you can perform this same function from the Sales Batch Entry Additional Menu without having to run a SQL script or access the Reconcile Receivable Amounts Window in GP.


One exception to the logic in the script is that this will not delete empty batches.  If you have an opinion as to how valuable that feature might be please leave a comment and I will evolve this accordingly.  This utility will simply do the following:
  1. Update batch totals for those that are NOT locked by a user with a Batch Activity Record (SY00800).  This was not designed to reconcile a specific batch but rather all batches at once.  So, don't select a batch in Sales Batch Entry when executing this routine unless you want the batch selected to be excluded from the logic.
  2. Create missing Batch Header records for batches that do exist in SOP WORK (SOP10100) but not SY00500.
This will be especially useful if you want to enable GP users to resolve SOP Batch Total discrepancies on their own without having to grant them access to the Reconcile Receivables Amounts window.

This was developed on GP 2010 and tested on both GP 2010 and GP 10.

07 June, 2011

Resolving "Error occurred in deployment step 'Activate Features': Invalid file name"

The other day I was working on a SharePoint project that required the deployment of a Content Type, a List Template, a couple of List Instances and a couple of Feature Receivers. Things were coming along well until I started to reorganize the project. I dragged the List Instances into the List Template folder and renamed several folders to better represent their purposes. When I went to deploy, I got the error: "Error occurred in deployment step 'Activate Features': Invalid file name".

I looked around the .spdata files, checked the Feature file and double-checked them all again. Everything looked right. The ULS Logger wasn't much help but it did give me the actual exception: "Exception: Microsoft.SharePoint.SPException: Invalid file name. The file name you specified could not be used. It may be the name of an existing file or directory, or you may not have permission to access the file"

Still not much help. I removed all the items from the feature and was able to deploy successfully. Unfortunately, a feature that doesn't do anything isn't much good so I started adding items and deploying one at a time. Feature Receivers: Check. Content Type: Check. List Template: Check. List Instance: Failed.

After looking at the List Instance for a while and not seeing the problem, I deleted the Instance from the project and recreated it from scratch. I added it to the feature, deployed and it failed again.

I went through the List Template again and saw the familiar warning:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<!-- Do not change the value of the Name attribute below. 
If it does not match the folder name of the List Definition project item, 
an error will occur when the project is run. -->
<ListTemplate
        Name="OldFolderName"
        Type="10001"
I had renamed the List Template folder from within Visual Studio but it did not update the ListTemplate Name element.

After correcting the Name to match the new folder name everything worked and the world was right again.

Add Solution:
Found 1 deployment conflict(s). Resolving conflicts ...
Deleted list instance 'Lists/SomeAwesomeList' from server.
Adding solution 'SomeAwesomeSolution.wsp'...
Deploying solution 'SomeAwesomeSolution.wsp'...
Activate Features:
Activating feature 'SomeAwesomeFeature' ...
Run Post-Deployment Command:
Skipping deployment step because a post-deployment command is not specified.
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
========== Deploy: 1 succeeded, 0 failed, 0 skipped ==========

25 April, 2011

15 April, 2011

File not found: VBA6.DLL in Microsoft Dynamics GP 9 Visual Basic Editor

Today I started a new project that had a requirement to create a new form in Microsoft Dynamics GP 9 to track additional item attributes.

On a clean install of Windows 7 32-bit, Office 2010, and Microsoft Dynamics GP 9, I received the file not found VBA6.dll error as soon as I'd made my first VBA modification:


I tried a few fixes including downloading and registering a new copy of the VBA6.DLL, but the error persisted.

Then I found a post by Beth Gardner describing the same problem. The resolution involved both a registry edit and the deletion of several files from the Dynamics GP folder.

The solution worked perfectly for me and I expect to see this problem more in the future as it seems to be related directly to an install of Office 2010.

I could not replicate the problem on a clean install of Windows Server 2008 R2 on which I had not installed Office 2010.


03 April, 2011

Microsoft Responds with Excellent Customer Service

I discovered a problem in the way Dynamics GP Evergreen Contract Lines calculated revenue when 1) billing annually and 2) entering a quantity > 1 on the Contract Line.  Quite simply, it just didn't calculate the Total Amount on the Contact Line or the Invoice Amounts accurately.  This client is running GP 2010.

This was discovered late in the implementation finally being logged as a bug by Microsoft Support just days before data conversion was to be completed for the cutover to production.  Yikes!!  I was in quite a pinch without a good Plan B just days before go live.  After discussing the situation with the Microsoft Field Service Development team they mobilized to produce a fix for this problem in just over 24 hours.  Great response!

They really saved the day to ensure a smooth go live and successful Field Service Series implementation for my client.  A hotfix for this problem is forthcoming from Microsoft.  If you find yourself struggling with this issue when working with Evergreen Contracts in Dynamics GP Contract Administration shoot me a message and I'll help you get by in the meantime.

28 March, 2011

Voting for the Most Influential People in Microsoft Dynamics continues...

Check out the Dynamics Community blog post on the voting for the most influential people in Microsoft Dynamics.  They did a great job of highlighting the Dynamics GP contingent to make it easy for you to vote.  They've moved me to Poll 5.

15 March, 2011

Dynamics World List of Influential People

I'm not really sure how, and no I did not nominate myself, but I made it into the top 260 nominees for Dynamics World's Microsoft Dynamics Most Influential People.  Thanks to who ever did nominate me.  You can view the list of nominees here.

Several of my old friends are on the list; Mark Polino, Ross Carlson, Dwight Specht, Troy Ensor, Bob McAdam, and Shane Hall to a name a few.  Plus some of my new friends like Mariano and Dave Musgrave will surely be moving up the list this year.  People like Andy Hafer really deserve the recognition for their contributions to the community as do all of the Dynamics MVPs that we all hear from so often.  Many of those who run the popular VAR and ISV organizations are on the list as well.

You can vote for those that you think deserve recognition for their contributions at http://www.dynamicsworld.co.uk/2011Voting.php.  You will have to scroll through the polls to find individuals you might want to vote for.  I'm in Poll 11 as are Dwight Specht (IBIS), Tony DiBenedetto (TriBridge), Andy Hafer (GPUG), and Bill Marshall (MC2).

11 March, 2011

Ooops! I marked a SOP Line as Drop Ship after I fulfilled it

I recently received a request to lock down the Sales Transaction Entry Line Drop Ship checkbox when a line had been fulfilled.  This purpose was to prevent users from mistakenly marking a fulfilled line as Drop Shipped which automatically removes all of the Serial Numbers from the line.

To do this just add the Sales Transaction Entry window to Visual Basic.  Then add the Quantity Fulfilled field and Drop Ship checkbox to your project.  Copy the code below and paste it behind the SalesTransactionEntryDetail(Grid):

Private Sub Grid_AfterLineGotFocus()
    DropShipLock
End Sub

Private Sub QtyFulfilled_AfterUserChanged()
    DropShipLock
End Sub

Private Sub DropShipLock()
    If QtyFulfilled.Value <> 0 Then
        Dropship.Enabled = False
    Else
        Dropship.Enabled = True
    End If
End Sub

This will enable or disable the Drop Ship checkbox based on whether the Quantity Fulfilled is equal to 0 on both the Grid After Line Got focus and Quantity Fulfilled After User Changed events.

You can do this yourself as I describe above or download and import the package file with this code here.