Page 1 of 2112345678910...20...Last »

How to dynamically modify Extender windows

David Meego - Click for blog homepageThis blog article has been prompted by the thread below on the Microsoft Dynamics GP community forum:

I had responded with some information on the thread, but when I tried to implement the suggestions I made, I found that it was not actually possible and that other methods would be needed.

The Extender product is a very clever tool created by my friend Andrew Brown from eOne Solutions, it allows Microsoft Dynamics GP windows to be “extended” with additional custom fields. These fields are entered using additional Extender windows and are stored in a series of tables in SQL Server. Each custom field is stored as a single record in one of a series of SQL tables depending on its datatype. The idea behind the product is to allow customisation of Dynamics GP without needing any coding. That said, the Extender Enterprise product does allow you to add custom logic with scripts.

While Extender itself is very flexible, it can be difficult to customise, or modify the windows. The methods that you would use for a standard window will not work.

The Problem

The issue is that Extender windows as they are seen by the user don’t really exist. The Extender windows that the user sees are dynamically created using a series of hidden template windows. For each type of Extender window or form, there are 10 template windows. The reason for the multiple windows is so that you can open more than one Extender window of each type at a time, Extender just uses the next available window. This is similar to how Dynamics GP has five Note windows which are dynamically used.

Each of these windows has one field of each datatype for each line on the window. When the window is opened by Extender, it reads the setup definition then hides and shows the fields as required to display the correct window. It populates the read-only string fields to display the prompts and also renames the window title. Finally, it resizes the window to remove the extra white space.

Disclaimer: There may be other steps and the order might differ. I don’t have the source code, so this is just my understanding…. but you get the idea. :-)

So, how can I modify a window that is dynamically created from one of the template windows? For our example, I want to disable the delete button on an Extender window, but only when that window is being used as a specified Extender window (based on the Window Extender ID).

Below are some of the usual tools which can be used and details of their limitations:

Customisation Tool Issues Notes
Modifier As the Extender windows are hidden from the Security subsystem, it is not possible to tell Dynamics GP to open a modified version of the window instead of the original. Even if it could work, you would need to modify all 10 windows of the same type and any change would affect all Extender windows of the same type as there is no scripting.
Field Level Security As the Extender windows are hidden from the Security subsystem, they cannot be selected from the Field Level Security Resource Explorer. Even if you could select the window, you would need to modify all 10 windows of the same type and any change would affect all Extender windows of the same type as there is no scripting.
Rockton Software’s Conditional Field Level Security As the Extender windows are hidden from the Security subsystem, they cannot be selected from the Field Level Security Resource Explorer. Even if you could select the window, you would need to modify all 10 windows of the same type. With the conditional scripting it would be possible to check which Extender ID and make the customisation dynamic, but Field Level Security prevents us even selecting the window.
Visual Basic for Applications It would be possible to use VBA scripting to read the Extender ID and create a dynamic customisation. This customisation would have to be repeated for each of the 10 windows and then be deployed to every workstation in your system.

 

The Simpler Solution

Just use GP Power Tools.

Using the Resource Information window in Form mode with the show currently selected window option enabled, I clicked on the Delete Button on the example Extender window that I created. It identified the field as ‘Delete Button’ of window ‘User Defined Window’ of form PT_UD_Window_1.

Using the Runtime Execute window, I used the Names button to lookup other fields on the PT_UD_Window_1. To display the form on the GP Power Tools Resource Explorer, I ticked the Hidden Forms checkbox. I located the ‘PT Window ID’ field which holds the Extender Window ID.

warning 'PT Window ID' of window 'User Defined Window' of form 'PT_UD_Window_1';

The above code was executed in the context of the Extender Dictionary and confirmed that the field contained the value I was expecting for the open Extender window.

Using the Automatic Debugger Mode Setup window, I created an Automatic Starting, Non-Logging Trigger on the Window Activate Focus event of the window ‘User Defined Window’ of form PT_UD_Window_1 with the following script:

out boolean OUT_Condition;

OUT_Condition = false;

if isopen(form PT_UD_Window_1) then
	case 'PT Window ID' of window 'User Defined Window' of form 'PT_UD_Window_1'
		in ["TEST ITEM 2"]
			disable 'Delete Button' of window 'User Defined Window' of form 'PT_UD_Window_1';
			OUT_Condition = true;
		else
	end case;
end if;

Where “TEST ITEM 2” in the case statement is the Extender Window ID for the window on which I want to disable the Delete Button. If desired, more windows can be added into a list separated by a comma.

Extender Window Delete Example

Using the Window Activate (window gains focus) event is a little lazy but it avoids having to identify the actual script after which our code should run.

Extender Window Delete Example 2

The final step, is to duplicate (using the Duplicate Button) and modify the Triggers for the other 9 windows. It is easiest to copy the script into a Notepad.exe window before modifying the form name on the Resource tab, so it can be pasted back.

Deployment of the customisation is simple… it is already done. The triggers will automatically start working on all workstation on which GP Power Tools is installed.  No need to do anything more.

The example GP Power Tools settings file for the 10 windows can be downloaded from here.

Hope you find this helpful.

David

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

Filed under: Development, Dynamics, GP, GP Power Tools, Microsoft, Modifier, Products Tagged: Application, Extender, GP Power Tools, GPPT, Modifier

Read More:
How to dynamically modify Extender windows

September 1, 2015 · WinthropDC · No Comments
Tags: , , , , , , , , , ,  · Posted in: Blogs I Follow Total Views: 20

Solving Performance Problems with Microsoft Dynamics GP and Windows 10 – Part 2

David Meego - Click for blog homepageFollowing on from my previous post: Solving Performance Problems with Microsoft Dynamics GP and Windows 10 – Part 1, I was still not happy with the performance of Dexterity and Microsoft Dynamics GP on my newly updated Windows 10 development machine.

This article takes you through the steps to get your Dexterity and/or Dynamics system running fast on Windows 10.

I normally don’t post multiple articles in one day, but it was worth posting this one and the previous two as soon as possible to help others out there facing the same issues.

Performance Problem

After resolving the pause on exit issue discussed in the previous post, I noticed that Dexterity and Microsoft Dynamics GP where still very sluggish when running. It was taking much to long to log in and everything was like I was running through molasses.

Checking the Task Manager, I could see fairly high CPU usage. Sorting by the CPU column, the culprit was the Antimalware Service Executable. This Windows process is the real-time processing component for Windows Defender.

I have seen issues before with anti virus or malware solutions causing performance issues for Microsoft Dynamics GP and Dexterity, and the easiest way to resolve them is to add some exclusions to the settings for the application.

Part of the issue is that the Dynamics dictionary is a very large single file and the anti virus solution often wants to check the entire file when only a small part of it is being read. So you want to exclude the file type with the extension .DIC.

This is the same issue with the database and log files maintained by SQL Server. So you want to exclude the folder where SQL Server stores its .mdf and .ldf data files.

As a final step (that delivered some of the best performance improvement), I also excluded the executables for Dexterity, Dexterity Utilities and Dynamics. I have five versions of each installed, so that needed 15 entries.

Solution

To make the changes on your Windows 10 system running Windows Defender follow the steps below. If using a different anti virus or malware solution, you can add the same exclusions anyway.

  1. Select Start >> Settings
  2. Select Update & Security >> Windows Defender
  3. Under Exclusions, click Add an exclusion
  4. Under Folders, click Exclude a folder
  5. Locate the SQL Server Data folder and exclude it. On my system it was
    C:Program FilesMicrosoft SQL ServerMSSQL11.MSSQLSERVERMSSQLDATA
  6. Under File Types, click Exclude a file extension
  7. Add .dic as an exclusion
  8. Under Processes, click Exclude a .exe, .com or .scr process
  9. Navigate to the Dex.exe, Dexutils.exe for each version of Dexterity and add it
  10. Also navigate to the Dynamics.exe for each version of Microsoft Dynamics GP and add it

Now test out how fast your system runs Dexterity and/or Microsoft Dynamics GP. Zoom Zoom. :-)

Hope you are happy with your Windows 10 upgrade now.

David

PS: I know adding exclusions weakens your protection, but it does stop you pouring a liquid into the machine in the hopes of dissolving the molasses.

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

Filed under: Development, Dexterity, Dynamics, GP, Microsoft, Windows Tagged: Application, Development, Dexterity, GP 2010, GP 2013, GP 2015, Windows 10

Read More:
Solving Performance Problems with Microsoft Dynamics GP and Windows 10 – Part 2

August 13, 2015 · WinthropDC · No Comments
Tags: , , , , , , , , ,  · Posted in: Blogs I Follow Total Views: 72

Solving Performance Problems with Microsoft Dynamics GP and Windows 10 – Part 1

David Meego - Click for blog homepageNow that I am running Windows 10 and am starting to get back to work with developing for Microsoft Dynamics GP and Dexterity, I have been noticing some serious performance issues.

This article takes you through the steps I used to identify the issue and what I did to resolve the issues. After making the changes listed in this and the next article I am happy with my Windows 10 development environment.

The first issue I noticed was that when I exited Dexterity Test mode, there was a significant delay (about one minute) before I was returned to the Dexterity IDE (Integrated Development Environment). I tested this on multiple Dexterity versions and it still occurred. To make sure that it was nothing in my code, I tested using a clean Dynamics.dic and it still occurred.

To test if it was a Dexterity issue or Microsoft Dynamics GP in general, I started testing with multiple versions of Microsoft Dynamics GP and each time there was a minute pause when exiting. The problem was occurring for all current versions (GP 2010, GP 2013 and GP 2015) in both the runtime and development environments.

Note: I did not have this issue on my other Windows 10 machine, so it does not occur for all machines. It just occurred on my primary development machine. :-(

So now I put my Microsoft Escalation Engineer hat back on to troubleshoot and identify the cause. Using a source dictionary in Dexterity, I used the Script Log to capture the scripts running when you exit GP. The excerpt from the script.log file below shows two calls to the script exitDynamics of form Main Menu with a significant 30 second plus time before the next script.

14:12:04  'Main_Menu FORM POST on form Main Menu'
14:12:04      'exitDynamics of form Main Menu'
14:12:40          'SQLPath', 0, 7, 31, ""
14:12:40          'GetClientUIType()', 0
14:12:40          'Add_Successful_Logout_Record'
14:12:40          'DeleteUserMessages of form sySendMessage', "sa"
14:12:40              'SQLPath', 0, 7, 0, ""
14:12:40          'IsCreated() of form syDeferredPassword', 0
14:12:40      'isDynUtils() of form LibSystem', 0
14:12:40      'exitDynamics of form Main Menu'
14:13:12          'GetClientUIType()', 0
14:13:12          'Add_Successful_Logout_Record'
14:13:12          'DeleteUserMessages of form sySendMessage', "sa"
14:13:12          'IsCreated() of form syDeferredPassword', 0
14:13:12      'smDEX_Clear_Locks', 0, 15
14:13:12          'SQLScriptPath', 0, 7, 3069, ""
14:13:13      'ST_CleanupBeforeLogout'

Looking at this script, the issue had to occur between the start of the script and the first call to the GetClientUIType() function. So I placed a breakpoint at the top of the script and stepped through the script until it hit the pause. Below are the lines of code and the command causing the pause was the DDE_IsAppRunning(CONTAIN) call.


if (TEMPCloseOLE of globals) then
    if DDE_IsAppRunning(CONTAIN) then
        set fDummy to OLE_Exit();
    end if;
end if;

Looking at the DDE_IsAppRunning(CONTAIN) call, I could see that it was inside a conditional statement and so if we changed the value of the global variable TEMPCloseOLE of globals it should be possible to avoid the pause on exit issue.

Using the trusty References facility in Dexterity, I located the TEMPCloseOLE global field and asked what it was referenced by. In the global procedure Setup_System_Variables, I found the following lines.


set sFlag to Defaults_Read(DEXINI_OLECLOSE);
set TEMPCloseOLE of globals to (sFlag <> FALSE_STRING); 

This showed that the TEMPCloseOLE of globals variable was set once based on the Dex,ini setting referred to by the constant DEXINI_OLECLOSE (which evaluates to OLEClose).

With this information in hand I added the following Dex.ini setting to my system and tested again:

OLEClose=FALSE

Et Voila, the delay on exit disappeared. First problem solved. I forwarded my research to Microsoft Support in case anyone else was having this issue…. and it turned out that others had seen it.

The delay on exit issue was reported on the partner forum and my “workaround” solution was provided, then my friend Mariano blogged about it. Here are the links:

Hope this information helps take away the frustration I was having.

David

PS: I don’t really speak French, even though I did study it (and Latin) in primary school in the UK before I moved to Australia. I have even been to France, but that did not help.

PPS: Before you ask, I don’t speak Latin either… it is a dead language and even the Italians don’t speak it any more.

PPPS: OK, yes I know that even though Latin is dead, its influence lives on in many European languages.

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

Filed under: Development, Dexterity, Dynamics, GP, Microsoft, Windows Tagged: Application, Development, Dexterity, GP 2010, GP 2013, GP 2015, Windows 10

Visit site:
Solving Performance Problems with Microsoft Dynamics GP and Windows 10 – Part 1

August 13, 2015 · WinthropDC · No Comments
Tags: , , , , , , , , , , ,  · Posted in: Blogs I Follow Total Views: 40

Field Level Security can crash Microsoft Dynamics GP 2015 Web Client

David Meego - Click for blog homepageWhile working on testing GP Power Tools, I had to investigate an issue with GP Power Tools running on the Microsoft Dynamics GP 2015 Web Client, and discovered a bug which can crash the web client.

The problem I was seeing was just by having GP Power Tools installed, the web client would crash after login or when opening the first window. Note that this issue is resolved now.

I spent some time analysing the GP Power Tools code and tracking the flow of the scripts by adding warning statements into the code until I was able to narrow down the feature that was causing the crash.

Further investigation allowed me to identify the actual script causing the problem and finally, I was able to locate the actual line of code. The reason it was harder than normal to locate the issue was that the code in question was dynamically created pass-through Dexterity sanScript code executed in the context of the runtime engine’s Dex.dic dictionary.

To access more detailed dictionary resource information than available via the Resource_ function library commands, GP Power Tools and in particular the Resource Explorer window use the Script Explorer window in the Dexterity runtime engine. Dexterity developers will be familiar with the window which has part of the script debugger and is used when opening or debugging scripts.

ScriptExplorer

The techniques using this window were published in my 2001 conference session Pushing the Limits with Dexterity. For more information see the Cross Dictionary Dexterity Development article on my old blog.

The error was caused by the line of code that opened the Script Explorer form in a script that would retrieve a list of windows for a specified form in a dictionary.

I knew that the Field Level Security feature included with Dynamics GP (which I originally developed as Omni Field Security) has a similar Resource Explorer window. So I tested that window and it seemed to work fine.

Then I noticed that my script closed the Script Explorer form before opening it and wondered if the issue was not opening the Script Explorer, but re-opening it after it had been closed.

The Resource Explorer window in GP Power Tools and the one in Field Level Security also closed the Script Explorer window when the Resource Explorer form is closed.

So I tested the theory and closed Field Level Security (and so the Resource Explorer and in turn the Script Explorer) and then re-opened Field Level Security (which opens the Resource Explorer and the Script Explorer) and boom. It crashed with the following error:

A server side exception of type “ArgumentException” has occurred.

WebClientError

I have since updated GP Power Tools to never close the Script Explorer window and just to initialise it when it is needed. This has resolved the crashing problem.

However, if you open and close Field Level Security and then re-open it, you can cause the web client to crash. It might not happen every time, but be aware that using Field Level Security more than once per web client session could be risky.

Note: While trying to reproduce the error to get the screenshots for this article, it took a few goes before the web client crashed.

If you are game, try it and let me know (via the comments) if you can replicate. Maybe it is just my install. If the session does crash, make sure you clean up the stranded session using End Task with Task Manager.

TaskManager

Also don’t forget to log back in as the same user and company to clean up the activity tracking records.

David

PS: I have also reported this issue to Microsoft and they will investigate it.

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

Filed under: 2015, Dynamics, GP, Microsoft Tagged: Application, Exception, GP 2015

Continue reading here:
Field Level Security can crash Microsoft Dynamics GP 2015 Web Client

July 2, 2015 · WinthropDC · No Comments
Tags: , , , , , , , , , ,  · Posted in: Blogs I Follow Total Views: 90

What’s New in Microsoft Dynamics GP 2015

David Meego - Click for blog homepageAt the start of December 2014, Microsoft Dynamics GP 2015 was released to manufacturing and shortly after it was posted online:

Since its release, the Support and Services team have been putting together blog articles and videos providing details about the new features.

For a quick overview, I would suggest watching the great videos below:

Microsoft Dynamics GP 2015 System Wide New Features (direct link)

 

Microsoft Dynamics GP 2015 New Features- Applications (direct link)

 

For more information, check out the series of articles from the support team.  Click on the link below for the table of contents:

If you have not downloaded the installation files for Microsoft Dynamics GP, please use the link below:

Enjoy

David

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

Filed under: 2015, Dynamics, GP, Microsoft Tagged: Application, Blogosphere, GP 2015

Read More:
What’s New in Microsoft Dynamics GP 2015

February 11, 2015 · WinthropDC · No Comments
Tags: , , , , , , ,  · Posted in: Blogs I Follow Total Views: 145

Opening Up a World of Possibilities with Microsoft Dynamics GP 2015 and Services

Alice Newsam - Click for blog homepageOn 13th August in Fargo the Microsoft Dynamics GP development team delivered a hands-on workshop to our Collaborative Development partners around the new Service Based Architecture (SBA) that will be available in Microsoft Dynamics GP 2015.  Throughout the day the team went over various pieces such as .NET Interop, changes to the current toolsets and implementation considerations.  They also provided hands-on learning time with the ISV Preview VM for the partners to work with the new code.  In this post I’d like to highlight Kevin from EthoTech, Inc. and his experience creating a service procedure with the new functionality. 

EthoTech, Inc. specializes in automated commission management systems. As such they have very close ties into Dynamics GP today.  However when looking at their future feature list many of them require some type of action to be taken within the system before the automated jobs can take over. After attending the workshop and getting some hands on time with the architecture Kevin had this to say “We’re excited about the service-based architecture, as it affords us the opportunity to provide some of the most-requested features of Commission Plan”.  Now when things like sales documents are created outside of the Dynamics GP user interface, the associated commissions can be automatically created.  They can also envision running tasks such as commission updates and reports as scheduled jobs now that they will have access to the system via the Service Based Architecture feature set.

After returning to the office from the workshop Kevin was able to create his own service procedures in his dictionary and successfully make an external service call to his new procedures and run the existing business logic that had been only accessible through the UI previously.  Below are some observations and recommendations around the process from him.

How easy was this process for you?

“This process was very straightforward. Within a short time, I was able to interact with the major Commission Plan calculation routines via a web service. We’re now reviewing all our products to determine which features to make available as web services. EthoTech’s Next Numeric Collection is an obvious choice – when master records are created outside the UI, calling the procedure will return the next master record number, with validation.”

What things did you like most about the feature set? 

“With a small amount of code refactoring (primarily logging error states rather than popping error messages), I am now able to expose my existing Dexterity procedures as web services. This provides tremendous benefit to our clients with no additional development overhead (i.e., I don’t have to rewrite my code outside of Dex).”

What recommendations would you have for others preparing to do the same thing?

  • Learn about REST services to gain base knowledge around things like REST verbs
     
  • Download the Service Based Architecture Developer Preview now available on PartnerSource
     
  • Walk through the examples and samples provided
     
  • Think about what abilities you would want exposed externally as a service to solve your customer’s problems or allow for even great functionality with Dynamics GP
     
  • Give thought to how you can leverage the creation of GP documents now in Sales Order Processing, Receivables, GL, Payables, etc. along with the actions around these documents such as transferring, posting, and so on. Especially consider the actions that don’t currently exist in eConnect like posting inventory transactions.

As a development team we are working to create more examples and build out the documentation surrounding these features.  We also have a series of blog posts coming that will reveal more about the various pieces that will be available to you and Service Based Architecture will be greatly featured in the upcoming reIMAGINE 2014 event planned for 10th to 12th November in Fargo, North Dakota, USA.  The powerful possibilities being enabled through the developer toolset via the tight .NET Interop integration and service based architecture coming in Microsoft Dynamics GP 2015 are vast.  What scenarios will you be able to light up for your customers? 

Happy coding!

Alice

Original post:
Opening Up a World of Possibilities with Microsoft Dynamics GP 2015 and Services

September 22, 2014 · Alice Newsam Msft · No Comments
Tags: , , , , , , , , , ,  · Posted in: Blogs I Follow Total Views: 185

New Microsoft Dynamics GP Videos

David Meego - Click for blog homepageLast week, the Microsoft Dynamics YouTube Channel released 3 new videos for Microsoft Dynamics GP.

Below are the videos for your watching pleasure.

If you want more information on Microsoft Dynamics GP, check out the overview page:

 

Microsoft Dynamics GP Keeps People Productive (Direct Link)

(Please visit the site to view this video)

 

Microsoft Dynamics GP Turn Data into Business Insight (Direct Link)

(Please visit the site to view this video)

 

Microsoft Dynamics GP Helps You Get Started Quickly (Direct Link)

(Please visit the site to view this video)

 

Enjoy

David

View article:
New Microsoft Dynamics GP Videos

September 18, 2014 · David Musgrave · No Comments
Tags: , , , , , , , ,  · Posted in: Blogs I Follow Total Views: 300