Skip to main content

Notifications

#Dexterity Script Editor Undocumented Features: Snippets and Auto Close

David Musgrave MVP GPUG All Star Legend Moderator Profile Picture David Musgrave MVP ... 13,781 Super User

David Meego - Click for blog homepage A recent Microsoft Dynamics GP forum post reminded me to create an article about a couple of cool, undocumented features available for the Dexterity Script Editor.

The request was for an easy method of inserting a script header comment block into new scripts. I have seen some developers modify/hack the DEX.DIC with Dexterity to produce similar custom functionality, but there is built in functionality you can enable instead.

The two features I want to discuss are enabled using Dex.ini settings and are described below:

EnableSnippets=TRUE

Dexterity has a hidden Snippets feature!

Yep, thanks to Patrick Roth (ex Great Plains/Microsoft, now at eOne) there is a Snippets feature in Dexterity. I am not sure what version it was added, but it was never publicized (until now … even though I have mentioned it in a conference session previously).

Once the Dex.ini setting is added and the feature enabled, you will find a Snippets button appears on the top right of the Resource Explorer.

Clicking on this button opens the Snippet List window, from which you can maintain your Snippets. You can create New Snippets, Copy an existing Snippet, open Snippets for Editing, or Delete Snippets.

Double clicking on a Snippet also opens it for Editing. The Snippet Maintenance window is used to define the Snippet. The Menu Heading and Snippet Description is what is used to select the Snippet in the Script Editor, this allows Snippets to be grouped into menus.

You can also export and import Snippets as *.snippet or *.txt files using the buttons on the top right of the window.

Once you have all your Snippets defined, they will be available from the Script Editor to the right of the References button.

The Snippet Data is stored in a local Ctree table stored in the Data folder (Snippets.dat and Snippets.idx). These files can be copied between development environments and probably should also be backed up.

CloseOnCompile=TRUE

When most Dexterity Developers have finished working on a script, they click on the Compile Button immediately followed by the Close Button. When the above setting is enabled, clicking on the Compile Button alone will automatically close the script editor.

Hope you find these little gems useful.

David

PS: Subscribe to the blog to get more of these little nuggets.

This article was originally posted on http://www.winthropdc.com/blog


This was originally posted here.

Comments

*This post is locked for comments