Today I saw another posting on the Microsoft Dynamics GP Community Forum about an error when going into Dexterity test mode after upgrading an application from a previous version to version 10.0.
The error message is as follows:
Unhandled script exception:Illegal address for field 'PowerUser' in script 'Setup_System_Variables'. Script terminated.
Note: When upgrading to GP 2010, the same issue can cause the following error message:
Unhandled script exception:Illegal address for field 'ReportTemplatesEnabled' in script 'Setup_System_Variables'. Script terminated.
I have seen this error reported a few times and so I will post the solution here.
I am assuming that you are using source code control and that before upgrading all resources have been checked in and the index file updated. For more information on the index file look at the Getting Started section of the Dexterity Articles & Links page.
I am assuming you then upgraded into a copy of a new, clean v10.0 Dynamics.dic file using Explorer >> Source Control >> Update... from the Resource Explorer menus. Then you checked the "Use Index File" option.
NOTE: Do not use the toolbar Update button as this will not use the index file and cause all your resource IDs to be renumbered in alphabetical order.
Now when selecting Debug >> Test Mode or Ctrl-T, you receive the error message.
Cause
This issue is occurring as the new 'PowerUser' of globals system variable does not exist in your development dictionary. There may be other missing resources, but this is the one that causes an error before anything else.
The reason that the 'PowerUser' of globals system variable is missing is because during the process of updating your custom code to version 10.0, Dexterity was not set up correctly to have the Original Dictionary Source Control setting point to a unaltered version 10.0 Dynamics.dic dictionary. This means that when Dexterity compares the contents of the repository to the Original Dictionary, it does not realise that the 'PowerUser' of globals system variable was added in version 10.0 and allows it to be overwritten when the Fields and Globals base resources are brought in from the repository.
Resolution
Note: The steps below assume that you are using Source Code Control, already have all the resources from the previous version checked into a source code respository and that you have created an index file for the resources in the previous version.
To fix please follow the steps below:
Now because the Original Dictionary setting was a base version 10.0 Dynamics.dic, the missing resources will be available and the error will be resolved.
The following Knowledge Base (KB) articles explain the process of upgrading Dexterity applications and how to use an index file:
How to set up the development environment when you use Dexterity in Microsoft Dynamics GP (KB 949622)
How to upgrade a Dexterity-based application in Microsoft Dynamics GP or in Microsoft Great Plains by using the Dexterity Source Code Control Service (KB 910527)
How to use an index file and the Microsoft Dynamics GP Dexterity source code control functionality to make sure that the resources that you create maintain the same resource ID in different builds and versions of your code (KB 894699)
This issue is now covered in the following KB article:
Error message when you try to enter Debugging Test mode after you upgrade a custom Dexterity application to Microsoft Dynamics GP 10.0: "Illegal address for field 'PowerUser' in script 'Setup_System_Variables'. Script Terminated" (KB 961968)
Please post a comment if this solution helps you.
David
17-Apr-2009: Added Link to KB 961968.
19-Aug-2010: Added extra error message for upgrading to GP 2010.
Posting from the Dynamics GP Blogster
http://dynamicsgpblogster.blogspot.com/2008/10/developing-for-dynamics-gp-weekly.html
Sorry, but i don't use Source Code Control, what can i do?
Hi Santiago
You will need to use source code control to upgrade applications from v6.0 onwards. Even if this is just the Generic Source Code control provider which uses text files in folders rather than Visual Source Safe.
PLEASE READ BEFORE POSTING
Please only post comments relating to the topic of this page.
If you wish to ask a technical question, please use the links in the links section (scroll down, on right hand side) to ask on the Newsgroups or Forums. If you ask on the Newsgroups or Forums, others in the community can respond and the answers are available for everyone in the future.