IntelliSense for Dexterity – DexSense 2.2 released

David Meego - Click for blog homepageTim Gordon from AlphaSOFT has released a new build of his great DexSense tool. 

Here is a list of some of the changes made:

  • Improved the stability of the COM interop (was causing crashes on some systems, specifically Windows 8)
  • Improved stability of the p/invoke calls – some were interfering with each other under certain circumstances during callbacks from Dex, causing DexSense to freeze
  • Improved local variable support (although additional improvements are coming, at the moment you need to press enter on a local variable declaration in order to refresh locals)
  • Added an automatic updater system (with daily/weekly/monthly checks)
  • Added the ability to customize the colors used on the interface
  • Tested against Support Debugging Tool in GP2013
  • Fixed a problem causing the mouse wheel to scroll in both Dexterity and the intellisense window at the same time
  • Tested against Windows XP – the UAC implementation for Vista and above had the potential to interfere with XP

 

Please go to the product page below and download the latest version:

 

For more information have a look at the previous articles on this blog:

 

If you are a Dexterity developer and you are not already using this awesome free tool, go download it now.

Thanks Tim for all your hard work.

David 

Read the original post:
IntelliSense for Dexterity – DexSense 2.2 released

August 5, 2013 · David Musgrave · No Comments
Tags: , , , , , , , , ,  · Posted in: Blogs I Follow Total Views: 794

Using Menus for Visual Studio Tools to launch ad hoc and custom applications

David Meego - Click for blog homepageBack in July 2008, I was attending a Developer Toolkit training course run by my friend, Steve Gray. It was during this course that the idea for Menus for Visual Studio Tools was created. Being the geek I am, I had a prototype of the concept running the next day. That code eventually became what you know as Menus for Visual Studio Tools.

Recently, Steve emailed me the link to an article on the DynDeveloper.com site which demonstrates a very cool method of using Menus for Visual Studio Tools with an XML file to define external applications to be listed in the Microsoft Dynamics GP navigation model.

Please have a look at the article for the details: 

 

For more information on visit the portal:

  

Glad to see people working out cool things to do with the tool. 

David

Continue reading here:
Using Menus for Visual Studio Tools to launch ad hoc and custom applications

August 2, 2013 · David Musgrave · No Comments
Tags: , , , , , , , , ,  · Posted in: Blogs I Follow Total Views: 1,022

Updated: spSearchOnAllDB: SQL Stored Procedure to Search an Entire Database

David Meego - Click for blog homepageFrom the Useful SQL Scripts Series.

Back in December 2008, I posted an article providing the spSearchOnAllDB stored procedure, originally created by Oufimtsev Gleb.

Based on feedback in the comments of that article, I have made two lots of updates to the script to fix some issues:

  1. It now handles tables and columns with long names which can include spaces.
     
  2. It now automatically doubles up any single quote characters in the search string passed to the stored procedure to avoid early termination of the strings used for the dynamically created code.

 

Note: To pass a single quote (‘) into the stored procedure, you will need to double it up to 2 single quotes (”) when you type in the parameter.

For example: to search for any single quotes in the data use: exec spSearchOnAllDB ‘%”%’

 

The updated script is provided at the bottom of the original post:

 

Enjoy 

David

View original post here:
Updated: spSearchOnAllDB: SQL Stored Procedure to Search an Entire Database

July 31, 2013 · David Musgrave · No Comments
Tags: , , , , , , , , , ,  · Posted in: Blogs I Follow Total Views: 210

Developing with the Microsoft Dynamics GP 2013 Named System Database

David Meego - Click for blog homepageMicrosoft Dynamics GP 2013 introduced another long sought after feature….
The Named System Database.

Instead of the System database being hardcoded to DYNAMICS, a different name can be selected when installing GP.

So what does that mean? Well, it means that more than one Dynamics GP system can reside on a single instance of SQL Server. Before when a second Dynamics GP system was needed, you would have to install a new instance of SQL Server. Now you can have multiple System Databases on a single server without needing additional instances of SQL Server.

For hosting partners, it means that they can host multiple clients off a single SQL Server instance. As a side benefit for consultants supporting multiple versions and multiple customers, it means no longer having to have lots of SQL Server instances on their machines

As a developer, how can I make sure my code uses the correct System Database for my instance?

From a Dexterity perspective it means updating your code to use a call to the function GetSystemDatabaseName() rather than using the constant SQL_SYSTEM_DBNAME to obtain the name of the System Database.

If you have code shared between previous versions of Dynamics, you can create your own function which has conditionally compiled code based on the value of a “version” constant. See the code below for an example:

Code MBS_GetSystemDatabaseName()

function returns string sSystemDBName;
optional in boolean fConnected = true;

#if MBS_PROD_MAJ >= 12 then
    sSystemDBName = GetSystemDatabaseName(fConnected);
#else
    sSystemDBName = SQL_SYSTEM_DBNAME;
#end if

 

But how can you write SQL code which can run against a company database, but reference data in the System Database?

You can’t just prefix the table names with “DYNAMICS..” anymore as that might not be the correct name for the System Database.

I discussed this issue with Patrick Roth who pointed out that the GP 2013 company databases now have a new sySystemDB (SY00100) table with a single record in it that provides the Company ID and the name of the System Database. So if you need to know the Company ID of the current company database or the name of the System Database, just get the first record in the table (ie. from Dexterity: get first table sySystemDB;). 

From SQL, try the query below to see the table.

select top 1 * from SY00100

So armed with this knowledge I created some code to build a query as a string to return some data from a table in the System Database. Then I used the exec() SQL function to call it. This works, but how can I return the value from the pass through SQL code to my script? The exec() function cannot do this, it has no mechanism to pass data back to the calling script.

I then asked my friend and SQL guru, Robert Cavill, “How you can execute pass through SQL code AND return data from the code?”. He told me about the sp_executesql stored procedure which allows for parameters to be defined and passed to and from the pass through SQL code.

The final piece to the puzzle was identifying whether to use the hardcoded “DYNAMICS” (for pre GP 2013) or to use the data in the SY00100 table for the System Database name. This was fairly easy to solve as the SY00100 table will only exist in a company database from GP 2013 or later.

The code below should be executed in the context of a company database. It will identify the associated System Database and then look at the Company Master table and return whether the Use Security Checkbox in the Company Setup window is selected:

SQL Code Example

– Define Variables
declare @UseSecurity INT
declare @SQLCode NVARCHAR(4000)
declare @SYSDBNAME CHAR(80)

– Identify System Database Name
if exists (select * from dbo.sysobjects where id = object_id(N’dbo.SY00100′) and OBJECTPROPERTY(id, N’IsUserTable’) = 1)
 select top 1 @SYSDBNAME = DBNAME from SY00100
else
 set @SYSDBNAME = ‘DYNAMICS’

– Define and Execute pass through SQL Code
set @SQLCode = N’select @pUseSecurity = USESCRTY from ‘ + rtrim(@SYSDBNAME) + ‘..SY01500 (nolock)
     where INTERID = DB_NAME()’
exec sp_executesql @SQLCode, N’@pUseSecurity int output’, @UseSecurity output

– Display result from Variable
select @UseSecurity AS UseSecurity

/* Copyright © Microsoft Corporation.  All Rights Reserved.                     */
/* This code released under the terms of the                                    */
/* Microsoft Public License (MS-PL, http://opensource.org/licenses/ms-pl.html.) */

 

 

I hope you find these techniques useful. I know I did. In my next post you will see why….

David

More:
Developing with the Microsoft Dynamics GP 2013 Named System Database

July 26, 2013 · David Musgrave · No Comments
Tags: , , , , , , , ,  · Posted in: Blogs I Follow Total Views: 242

Troubleshooting the Microsoft Dynamics GP 2013 Web Client – Part 3

Part 3 – Resolving Microsoft Dynamics GP 2013 Web Client Functional Issues

Last week, Part 2 of this series dealt with resolving Web Client implementation issues. The key to remember is any exception condition prior to the Microsoft Dynamics GP login window is treated as an implementation issue and as noted back in Part 2, there are two major processes – steps, if you will – in compiling information that will lead to resolving Web Client exceptions.

Just like with the implementation issues, you must compile information related to all application exceptions.
Let’s see what type of information can be compiled:

  • If the problem involves product functionality, it’s always a good idea to record the steps to reproduce the problem.
  • It’s also possible that the issues are UI related, i.e., a window does not display correctly (though these issues are less frequent, but certainly possible).
  • Printing and data export issues. In this case, you will want to determine whether the Silverlight application is being trusted.
  • Silverlight exceptions, i.e., those displayed in a window with a stop sign
  • Third party application customization vs. standard Microsoft Dynamics GP functionality. In a multi-dictionary setting, this will play a role whether using Web Client or the Rich Client (traditional Dexterity application).
  • Enable all available Web Client logs (session management and multi-tenant logs)
  • Capture all user-machine related information with MSINFO32.EXE
  • Can you reproduce the problem in the standard Microsoft Dynamics GP rich client application
  • Can the problem be reproduced by more than one user
  • Can the problem be reproduced in more than one company

The following are sample application exceptions:

Silverlight exception

App stuck on “Initializing” upon login

As you can tell, some of the information that must be compiled is standard. What must be taken into account here is, the Session Service is a real GP client running in the background supporting the Web Client session.

With that said, the following are some key success factors for the resolution of Web Client functional issues:

  • First, all issues must be treated jointly as Microsoft Dynamics GP issues and not something isolated to the Web Client.
  • You must keep in mind that Web Client will display the same exception messages displayed by the standard Microsoft Dynamics GP rich client.
  • Breakdown the problem and make sure it’s focused on the Web Client.

Finally, summarizing:

  • The Web Client functionality “resembles” that of the Microsoft Dynamics GP rich client – we use the word “resemble” here, because we know certain things like navigation are slightly different in Web Client.
  • The rich client is installed on the Session Host server(s), therefore files like DYNAMICS.SET, DEX.INI, and forms and reports dictionaries are still in the mix
  • All exceptions experienced by the rich client are submitted to the Web Client, whether handled or unhandled.
  • All Dexterity third party applications are supported in the Web Client.
  • The Web Client uses a proprietary messaging system.

In part 4 of this series, I will look into some tools available for troubleshooting both implementation and functional issues.

Until next post!

MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/

View original post here:
Troubleshooting the Microsoft Dynamics GP 2013 Web Client – Part 3

July 22, 2013 · Mariano Gomez · No Comments
Tags: , , , , , , , , , ,  · Posted in: Blogs I Follow Total Views: 205

Troubleshooting the Microsoft Dynamics GP 2013 Web Client – Part 2

Part 2 – Resolving Microsoft Dynamics GP 2013 Web Client Implementation Issues



Yesterday, in Part 1 of this series, I addressed the Microsoft Dynamics GP Support Team’s posture when addressing Web Client support cases, by cataloging each reported issue as either implementation- or functional-related. In this opportunity, I will look at the major processes involved in driving your implementation-related support case to a rapid and successful closure.

In the process of troubleshooting your Web Client implementation issue, there are two categories of data that need to be compiled to close a support case: installation information and application related exceptions.

Compiling the installation information typically involves gathering the following information:

  • Type of installation (Intranet/Extranet/both)
  • Information about certificates
  • Firewall and Ports information
  • Number of servers supporting the installation (Web Servers/Session Hosts/SQL Servers)
  • Information about load balancers (if exist)
  • Domain security groups and user accounts
  • Run the Web Client Diagnostic Tool available as an option when you open a support case.
  • Provide the XML output file created by the Web Client Implementation Tool, if available

Compiling the Web Client application related exceptions involves gathering the following information:

  • Dynamics application log events
  • Session Service logs (if enabled)
  • Session Central logs (if enabled)
  • Internet Information Services (IIS) logs
  • Web page exception messages
  • Tenant exception information (if using Multi-tenant Services)
  • Fiddler and Microsoft Network Monitor (Netmon) traces

Web Client implementation exceptions can usually be identified by an “Unexpected Error” message in the browser as shown below:

Web Client application exception

Traditionally a support case would be started with a screenshot of an issue. However, as it relates to Web Client, Microsoft Dynamics GP Support cannot determine what an exception really means other than the fact that you encountered an exception. As such, Web Client implementation cases will usually require running the Web Client Diagnostic Tool in addition to providing Event Viewer information related to the Correlation ID displayed in the browser.

Event Viewer: Dynamics application event log

In a future installment, I will be covering all the troubleshooting tools available at your disposal, including the Web Client Diagnostic Tool, Web Client Implementation ToolFiddler, and Netmon among others.

In Part 3 of this series, I will address functional exceptions and resolution of functional issues.

Until next post!

MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/

See more here:
Troubleshooting the Microsoft Dynamics GP 2013 Web Client – Part 2

July 19, 2013 · Mariano Gomez · No Comments
Tags: , , , , , , , , , ,  · Posted in: Blogs I Follow Total Views: 211

You Cannot Print An Unauthorized Purchase Order

As the title says, “you cannot print an unauthorized purchase order”. This is an error message which I encountered the other day on my demo system when I was trying to print a PO. Now, I’m largely not surprised to … Continue reading

See the original article here:
You Cannot Print An Unauthorized Purchase Order

July 12, 2013 · Ian Grieve · No Comments
Tags: , , , , , , , , , ,  · Posted in: Blogs I Follow Total Views: 452