MVP Frank Hamelly on Account Rollups and Organizing SmartLists

May 29, 2009

After a long writing hiatus, MVP Frank Hamelly on his gp2themax blog explains how to setup the often overlooked Accounts Rollup feature which he describes as “not as tasty as fruit rollups, but equally satisfying”.

Frank also explains how to use Microsoft Dynamics GP’s Navigation Pane to organize SmartLists for the end-users. His narrative is based on a requirement posed by the client at an actual project we both had the opportunity to work and collaborate on.

Please be sure to read Frank’s articles as you will find a lot of interesting things from his personal experience.

Until next post!

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


The inner workings of Microsoft Dynamics GP on Microsoft SQL Server

May 29, 2009

Unless you have been working with Dynamics GP from the days of Ctree and Btrieve, it is quite difficult to comprehend why Dynamics GP seems to behave (as in act up) in certain ways on SQL Server — how would I say this… not quite like your other Windows applications that run on SQL Server.

To understand some of these behavioral issues, David Musgrave brings a two-part series on Understanding how Microsoft Dynamics GP works with Microsoft SQL Server — if it was my article I would have labeled it Dynamics GP technological idiosyncrasies, but then again, I did not write it. 🙂

Ever wonder why the cryptic table names and columns? A lot of it has to do with the origins of the application and the multiple operating systems and ISAM platforms supported back in the 80’s and 90’s. Know your Microsoft Dynamics GP history… in the early days, long before Microsoft SQL Server, Dynamics GP ran on the Mac OS platform and supported Ctree and Btrieve as file server platforms. I guess at the end of the day, the development team figured it would be a daunting effort to make those tables and columns names meaningful for SQL Server.

Until next post!

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


Moving data between Microsoft Dynamics GP companies

May 28, 2009

I recently came across a question as to how to move data across Dynamics GP companies. It then became almost an instant challenge to find all the possible answers to this question and while I don’t claim to have them all, I will point out as many methods (and resources) I could think of. If you have used other methods I would certainly value your input to this post.

So here we go:

Method 1. SQL Server Backup/Restore.
This method assumes you will be creating an exact copy of the production data for either test purposes or as a simple fall back method for recovery purposes. See KB article 871973 for more information on how to create a mirrored copy of your GP data.

Method 2. Support Debugging Tool
You can use Support Debugging Tool’s XML Export and XML Import features to select specific tables to transfer. If transfering master tables, KB article 872709 lists the tables you will need to select for the transfer.

Method 3. Integration Manager
Integration Manager is still one of the best methods to transfer data between companies, especially at the end of an implementation, when you need to import master records and beginning balances into a production company that were previously recorded in a test company. Integration Manager can be found on your Microsoft Dynamics GP installation CDs. The following are links to the latest Integration Manager updates:

Microsoft Dynamics GP v9 – Click here
Microsoft Dynamics GP v10 – Click here

Method 4. SnapShot for Microsoft Dynamics GP
Written by David Musgrave, SnapShot works by copying the contents of selected tables to Ctree files in a separate folder, thus creating a SnapShot of the data. This separate folder can then be copied to a target system and the data inserted back into the actual tables. For more information on SnapShot and to download the product, visit the Developing for Dynamics GP website here.

Method 5. Company Setup Automated Solution
If the purpose is to transfer only setup information, then you will want to try the automated solution offered by Microsoft. The automated solution can be found here (CustomerSource/PartnerSource access required). For more information on Automated Solutions check out my previous article here.

Method 6. Table Import
Table Import is the forgotten tool. As many new and more robust tools are developed, this tool seems to drop to the bottom of the memory lane. Don’t forget that Table Import can bring data into specific GP tables that are not supported by the tools. Click here for more information about Table Import.

Hope you find these methods useful and contribute to the article with other methods you have used.

Until next post!

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


Microsoft SQL Server versions and editions

May 21, 2009

The purpose of this article is to describe how to identify your current Microsoft SQL Server version number and the corresponding product or service pack level. It also describes how to identify the specific edition of SQL Server you are using in your environment.

How to determine which version of SQL Server 2008 is running

To determine which version of Microsoft SQL Server 2008 is running, connect to SQL Server 2008 by using SQL Server Management Studio, and then run the following Transact-SQL statement.


SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')

The following results are returned:
The product version (for example, 10.0.1600.22)
The product level (for example, RTM)
The edition (for example, Enterprise)
For example, the results resemble the following.

10.0.1600.22 RTM Enterprise Edition

The following table lists the product version and file version (Sqlservr.exe) numbers for SQL Server 2008:


Product Version File Version (SQLSERVR.EXE)

RTM 10.0.1600.22 2007.100.1600.0
SQL Server 2008 Service Pack 1 10.0.2531.0 2007.100.2531.0

How to determine which version of SQL Server 2005 is running

To determine which version of Microsoft SQL Server 2005 is running, connect to SQL Server 2005 by using SQL Server Management Studio, and then run the following Transact-SQL statement.


SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')

The following results are returned:
The product version (for example, 9.00.1399.06)
The product level (for example, RTM)
The edition (for example, Enterprise Edition)

For example, the results resemble the following.

9.00.1399.06 RTM Enterprise Edition

The following table lists the product version and file version (Sqlservr.exe) numbers for SQL Server 2005:


Product Version File Version (SQLSERVR.EXE)

RTM 9.00.1399 2005.90.1399
SQL Server 2005 Service Pack 1 9.00.2047 2005.90.2047
SQL Server 2005 Service Pack 2 9.00.3042 2005.90.3042
SQL Server 2005 Service Pack 3 9.00.4035 2005.90.4035

How to determine which version of SQL Server 2000 is running

To determine which version of SQL Server 2000 is running, connect to SQL Server 2000 by using Query Analyzer, and then run the following code.


SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')

The following results are returned:

The product version (for example, 8.00.534)
The product level (for example, “RTM” or “SP2”)
The edition (for example, “Standard Edition”).

For example, the results resemble the following:

8.00.534 SP2 Standard Edition

The following table lists the product version and file version (Sqlservr.exe) numbers for SQL Server 2000:


Product Version File Version (SQLSERVR.EXE)

RTM 8.00.194 2000.80.194.0
SQL Server 2000 SP1 8.00.384 2000.80.384.0
SQL Server 2000 SP2 8.00.534 2000.80.534.0
SQL Server 2000 SP3 8.00.760 2000.80.760.0
SQL Server 2000 SP3a 8.00.760 2000.80.760.0
SQL Server 2000 SP4 8.00.2039 2000.8.00.2039

For releases of SQL Server prior to SQL Server 2000, check Microsoft Support KB article 31185. Keep in mind also there were a number of Cumulative Updates for each version, which are not listed above. For a detail list of Cumulative Updates version information check SQL Team‘s article on SQL Server Versions.

Until next post!

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


Securing VBA projects

May 20, 2009

It seems that nowadays we can add security to pretty much every aspect of the Microsoft Dynamics GP application, but when it comes to VBA projects things are not too clear for many developers and Dynamics GP systems administrators.

Follow these simple steps to secure your VBA project.

1. Open the Visual Basic Editor. Go to Microsoft Dynamics GP > Tools > Customize > Visual Basic Editor, or press ALT+F11 from your keyboard.

2. Open the project’s Properties window. Right-click on the project within Project Explorer and select the project Properties option. You can also access the project Properties window by highlighting the project and using the Tools menu.

3. Click on the Protection tab, then click on the Lock project for viewing checkmark.

4. Enter a password to prevent unauthorized access, then confirm the password entered.

5. Press Ok to apply the settings.

6. Save your VBA project and exit Dynamics GP. When you access the application next time and attempt to access your VBA project you will be prompted to enter a password to display it’s content.

If you have multiple projects, you will need to apply security individually to each by following the above outlined steps. Hopefully you will use the same password across to make things easier 🙂

Until next post!

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


The wonders of CTRL+Q: saving and printing SOP documents in one step

May 18, 2009

How many times have you wished you could save and print a sales order, a fullfillment order, or an invoice document, with their corresponding packing slips and picking tickets all in one step? The SOP Quick Print feature offers just that! Written by my friend David Musgrave, and a standard part of Microsoft Dynamics GP, it’s one of the most overlooked (or perhaps, unknown) yet, one of the most requested options by users working with SOP.

David says “Just set it up with the Keep Current Document Displayed option unchecked.Then instead of saving and then printing. Just use Ctrl-Q to quick Print.That will then save the document and print it.That’s what I wrote the feature for.

To access the setup window, click on the Options menu on the Sales Transaction Entry screen, then select Quick Print Setup. You can configure additional options even for packing slips and picking tickets, along with report output settings. You can also choose to let the document remain on the screen even after printed.

Once configured, you can then begin to enter your documents or select previously entered ones, then hit CTRL+Q from your keyboard. That’s it! Your document is saved then printed, all in one step! One of the most important benefits of this feature is, you don’t need to create your own customization.

Have a happy CTRL+Q with your SOP documents!

Until next post!

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


Sales Order Processing posting statuses

May 15, 2009

Well, everyday I learn something new. My friend and fellow MVP Victoria Yudin had been wondering what could be the possible values stored in the PSTGSTUS (‘Posting Status’) column of the tables dbo.SOP10100 (technical name: SOP_HDR_WORK) and dbo.SOP30200 (technical name: SOP_HDR_HIST) statuses as a result of a posting operation in Sales Order Processing.

In fact, just recently on the Dynamics GP Newsgroup, someone reported seing a status 508 in the SOP30200 table. The complete list was provided by a Microsoft support engineer on the Partners forum — take note as they are not documented in the SDK.

Transcript

All transactions in SOP10100 that have not been posted yet should have a PSTGSTUS value of 0 (unposted). This value of this field will change to 2 (posted) when posted and the record will move to SOP30200. With this in mind, all transactions in SOP10100 should have PSTGSTUS value of 0 and all transactions in SOP30200 should have PSTGSTUS value of 2 (posted). Any other values in either table would indicate that there was a posting interruption.

I have found invalid values of 12, 14, 508, etc. These values may have been assigned to the record in different stages of the posting process. Meaning, the posting process did not complete and the transactions need to be recovered in the Batch Recovery window.

Example:

1. Transaction 1 in SOP10100 (Work) with PSTGSTUS = 0.
2. Transaction 1 is posted:

a. PSTGSTUS is assigned the value of 7 while GP is checking for duplicate Document Numbers.
b. PSTGSTUS is assigned the value of 12 while GP is verifying the accuracy of the amounts between the detail and header records.
c. PSTGSTUS is assigned the value of 14 while GP is calculating that the total detail amounts match the header amount.
d. PSTGSTUS is assigned the value of 508 while GP is is in the process of transferring the record from Work (SOP10100) to History (SOP30200).
e. PSTGSTUS is assigned the value of 600 while GP is validating if the detail and header records match in the History tables (SOP30200 and SOP30300).
f. PSTGSTUS is assigned the value of 2 upon the end of the posting process.

In this example, if the posting process was interrupted after step a, then the record will still be in SOP10100 with a PSTGSTUS = 7. Or, if the posting process was interrupted after step d, then the transaction may still be in SOP10100 with a PSTGSTUS = 508.

The example above is not the exact posting process in GP. This is just a way of showing how a record in SOP10100 can have a PSTGSTUS value other than 0 and 2.

I must personally add that a transaction will only make it to SOP30200 with statuses of 2 or 3, as the transcript indicates, the other status are more used as a workflow within the posting process than really a status.

Until next post!

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


How to import the Vendor 1099 Box with Integration Manager

May 14, 2009

Business Situation

A few days aback I addressed an issue where the user needed to set the 1099 Box on the vendor import with Integration Manager. To my surprise, while there is a field to map the 1099 Type, there is no 1099 Box field in the Options collection in the Vendor import in IM. To make matters a bit more interesting, the user needed to have the 1099 Box filled based on some settings in the source system.

Solution

The 1099 Box is not accessible via Integration Manager, however we can create a small SQL Server stored procedure in the company database that will accept the vendor ID and the 1099 Box as parameters. The stored procedure in turn will update the vendor record with the value submitted.

dbo.uspUpdateVendor1099Box



-- Created by Mariano Gomez, MVP

IF OBJECT_ID ( N'dbo.uspUpdateVendor1099Box', N'P' ) IS NOT NULL
DROP PROCEDURE uspUpdateVendor1099Box;
GO

CREATE PROCEDURE dbo.uspUpdateVendor1099Box
@VENDORID CHAR(21) = NULL
,@TEN99BOXNUMBER SMALLINT = NULL
,@RET_VAL INT OUTPUT
AS

SET @RET_VAL = 0

IF (@VENDORID IS NULL) OR (@TEN99BOXNUMBER IS NULL)
BEGIN
SELECT @RET_VAL = 0;
RETURN
END

BEGIN TRY
UPDATE PM00200 SET TEN99BOXNUMBER = @TEN99BOXNUMBER WHERE VENDORID =
@VENDORID
END TRY
BEGIN CATCH
SELECT @RET_VAL = ERROR_NUMBER()
END CATCH;
GO

GRANT EXECUTE ON dbo.uspUpdateVendor1099Box TO DYNGRP
GO

Now, in the Vendor integration, we can open the After Document event script and add the following VBScript code:

After Document



' Created by Mariano Gomez, MVP
Const adUseClient = 3
Const adCmdStoredProc = 4
Const adSmallInt = 2
Const adInteger = 3
Const adChar = 129
Const adParamInput = 1
Const adExecuteNoRecords = 128

Dim oCn
Dim oCmd
Dim pVendorID, pTen99BoxNumber, pRetVal

set oCn = CreateObject("ADODB.Connection")
oCn.ConnectionString = "database=" & GPConnection.GPConnIntercompanyID
oCn.CursorLocation = adUseClient
GPConnection.Open(oCn)

With oCmd
.ActiveConnection = oCn
.CommandType = adCmdStoredProc or adExecuteNoRecords
.CommandText = "dbo.uspUpdateVendor1099Box"


'Set parameters
set pVendorID = .CreateParameter("VENDORID", adChar, adParamInput, 21, _
GetVariable("gVendorID"))
.Parameter.Append pVendorID

set pTen99BoxNumber = .CreateParameter("TEN99BOXNUMBER", adSmallInt, _
adParamInput, 8, GetVariable("gBoxNumber"))
.Parameter.Append pTen99BoxNumber

set pRetVal = .CreateParameter("RET_VAL", adInteger, adParamOutput)
.Parameter.Append pRetVal

.Execute
End With

If pRetVal.Value 0 Then
' Error handling here, you can choose to write to IM's log
End If

Since I am making use of global variables, gVendorID and gBoxNumber, we will need to capture both of these values in the vendor ID field script — we will no longer map the vendor ID since it’s necessary to use a field script.

Vendor ID field script



' Created by Mariano Gomez, MVP
SetVariable "gVendorID", SourceFields("someSource.Vendor")
SetVariable "gBoxNumber", SourceFields("someSource.Ten99Box")
CurrentField.Value = SourceFields("someSource.Vendor")

This conclude our integration! Don’t get discourage if you don’t see a specific field mapping in IM. With little creativity and the right mindset you can always come around with a solution that is worth showcasing.

Until next post!

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


Visit the new Dynamics Partner forums

May 12, 2009

Global English Partner Online Technical Communities upgraded to the forum platform since Apr 27, 2009, at 9:00am PST. I have to say I have been quite excited lately working on the new Dynamics GP (Partners) forum platform. Forums defer from Newsgroups in that these are moderated by Microsoft employees and are exclusive to Microsoft partners who are Registered members, Certified members, or Gold Certified members — this is, they are not public.

The following are links to the different partner forums:

Dynamics GP
Dynamics AX
Dynamics NAV
Dynamics SL
Dynamics RMS
Dynamics Sure Step

Until next post!

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


Is there a maximum number of lines that can be inserted in any given scrolling window?

May 11, 2009

Folks, this one can rather come across as a brain teaser or a catchy certification question, but don’t be surprised by how often I get asked during a demo and how often I — and many others — have automatically provided the unequivocal answer “Unlimited!”. The question comes in various flavors, for example:

  • How many distributions can I add to a journal entry?
  • How many line items can I add to a Sales document?
  • How many line items can I add on a Purchase Order?

Unlimited? The truth is, there is a limit to everything, whether the contraints are imposed by physical storage capacity or by a data type definition, the fact is, it’s nonetheless a limit.

So let’s take a look.

The Line Sequence Number field in Dynamics GP is generally defined as an integer value. According to Microsoft SQL Server Books Online, an integer requires 4 bytes of storage, which means it can any number between -2^31 and 2^31 or -2,147,483,647 and 2,147,483,647. Now consider this, the first line sequence number in a scrolling window is generally initialized with a value of 16,384 or 2^14, so mathematically speaking, a user will be able to add 131,072 lines or 2^17 before they hit an error and have to resort to inserting distribution lines in between the previous 131,072 ones.

I don’t know about you, but 131,072 lines in a scrolling window sound like quite a bit of lines — but certainly not unlimited — before you even begin to consider inserting lines in between, but you never know when you will come across that one customer who will push the system to it’s limit.

Related Articles:

Until next post!

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