Updating Dexterity code for Microsoft Dynamics GP 2013

David Meego - Click for blog homepageThis is a reposting of an article I originally wrote on my Developing for Dynamics GP blog.

Today we are going to cover some of the changes you will need to make to your Dexterity code to just bring forward your code to Microsoft Dynamics GP 2013. This will not leverage any of the new functionality or features of Microsoft Dynamics GP 2013, but will at least get your Dexterity code running.

Named System Database 

Microsoft Dynamics GP 2013 allows for the System Database to be named, so it is no longer hardcoded to DYNAMICS. This allows for multiple instances of the Microsoft Dynamics GP application to share a single SQL Server instance. For developers and consultants it will avoid the need to have multiple instances of SQL Server installed on their systems to support multiple application instances.

To update your scripts, do a find and replace on both the constants:

SQL_SYSTEM_DBNAME and ST_DYNAMICS

And replace them with the function in the Dynamics.dic core dictionary:

GetSystemDatabaseName()

Also search your scripts for “DYNAMICS” to check for any hard coded references.

 

Scripts with No Executable Code

Dexterity will now produce a warning for scripts which have no executable code in them, but need to remain in the dictionary, for example: placeholder scripts to trigger against.

The reason for the warning is to avoid un-necessary call backs between the User Interface and the business logic with the Web Client and so improve performance.

You can add the following pragma comment to avoid the warning message.

pragma(disable warning NoExecutableCode);

You could also add the command abort script; to the script to avoid the warning, but this will not help with the Web Client performance issue.

 

Please note that as always, after updating your code (with index file) into a clean GP 2013 DYNAMICS.DIC, you should recompile your entire dictionary. Changes to some commands, for example: Defaults_Write() will cause errors if the code has not been recompiled.

 

[Edit] For additional updating tips see the follow on post:

 

Hope this gets you going with Dexterity for Microsoft Dynamics GP 2013.

David

20-Feb-2013: Added link to Dex – Illegal address for field ‘System Database Name’ exception post.

25-Mar-2014: Added Link to follow on post.

This article was originally posted on the Developing for Dynamics GP Blog and has been reposted on http://www.winthropdc.com/blog.

11 thoughts on “Updating Dexterity code for Microsoft Dynamics GP 2013

  1. Also, it's good to note that developers should take care of cleaning up their Sanscript code from unnecessary comments to optimize performance at the web client level.
    MG.-
    Mariano Gomez, MVP

    Like

  2. Andrew,
    The reason why the web client is fast today is because of the serialization/deserialization algorithm that passes messages between the Silverlight client and the WCF GP Runtime Service and vice versa. To make that messaging even more efficient, the GP team had to optimize the Dex code in many places, including the removal of garbage (commented) code and also commented blocks of blobs describing what that code did.
    When you compress your dictionary with Dex Utils, all the code gets compiled and removed from the dictionary (assuming total compression). However, the compressed code is still available for the runtime engine to perform the actions in the dictionary. Commented code is simply code that is 'dormant', but present in the dictionary's metadata. The runtime engine only skips through it.
    That's as far as I am willing to go without stepping on my NDA.
    MG.-
    Mariano Gomez, MVP

    Like

  3. Need to know if we are to purchase new hardware before year end. Right now we can do demo development on laptop running windows 7

    Like

Please post feedback or comments

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.