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.


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.


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.


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


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

This article was originally posted on

5 thoughts on “Field Level Security can crash Microsoft Dynamics GP 2015 Web Client

  1. Hi David,
    The infamous error message “ArgumentException” seems to be all too common in the web-client… I’ve met that more than once during my testing and it turned often out that it was due to incompatible (improper coded? ) 3rd-party application that I had to remove from the .SET launch file of the Web Client on the server side…
    Sadly there is not much help around that error message and it is often very hard to identify what causes this, especially when the client keeps crashing right after the login into a GP company.. So far I had to eliminate the Extender module from eOne and also the Rockton Tool box doesn’t play too well with the Web-client.


  2. Invalid references in my dex code caused this error. These references were not caught by the dex compiler, but boy does the web client catch them! You are right they are tough to spot.


Please post feedback or comments

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

You are commenting using your 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.