Developing for Dynamics GP

by David Musgrave (Perth, WA, Australia) and the Microsoft Dynamics GP Developer Support Team (Fargo, ND, USA)

Updating Dexterity code for Microsoft Dynamics GP 2013

Updating Dexterity code for Microsoft Dynamics GP 2013

Rate This
  • Comments 9

David Meego - Click for blog homepageToday 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.

  • Great article, helps me to answer the client's concerned moving forward.

  • good one

  • 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

  • Mariano - that's an interesting point.

    Do comments in dex code slow down the Web Client then?

  • 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

  • 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

  • System Requirements and other information can be found on the links on the following article:

    blogs.msdn.com/.../microsoft-dynamics-gp-2013-launch-portal-and-system-requirements.aspx

    You should not need to upgrade your development hardware. You should consider installing Windows 8.

    David

  • i need help on error while running gp 2013. in dexterity ver 12.0

    "Illegal address for field 'System Database Name' in script 'GetSystemDatabaseName'. Script terminated."

  • Hi Aqeel

    The error you are getting is similar to errors from previous upgrades. I will post about it tomorrow. In the meantime, have a look at the following post for the solution.

    blogs.msdn.com/.../illegal-address-for-field-poweruser-exception.aspx

    David

Page 1 of 1 (9 items)
Comments Information

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.

Leave a Comment
  • Please add 2 and 6 and type the answer here:
  • Post