This is a reposting of an article I originally wrote on my Developing for Dynamics GP blog.
Yesterday, I had a support case come in where the customer was complaining that SmartList was not working properly and that the Search window was not being displayed correctly.
During a screen sharing session with the customer, they explained that when they first opened SmartList and then the Search window it would say “Search [Not Found]” in the title and that clicking on the Columns button would not show any fields. See the screenshot below:
However, once they closed the Search window and re-opened it everything worked fine. They wanted to know why it kept failing the first time they opened SmartList, but worked fine the second time or later.
The site is currently using Microsoft Dynamics GP 2010, but is performing User Acceptance Testing (UAT) on a test upgrade to Microsoft Dynamics GP 2013. The user doing the testing claimed that they performed exactly the same actions on GP 2010 and it has always worked, but now on GP 2013 it did not work.
I had tried testing the issue on my system was unable to replicate the issue, I tried everything I could think of and could not get SmartList to fail. So we organised a screen sharing session to see what was happening.
During the screen sharing session we got the customer to demonstrate the issue, but when we tried to replicate via remote control we were unable to get SmartList to misbehave. We got the customer to check if SmartList behaved correctly for another user and it did.
We did notice that the customer was using a Quick Link on their homepage to open SmartList. So we tested opening SmartList using the icon on the Standard Toolbar. When using the Toolbar button, the user was unable to replicate the problem. They could only replicate when using the Quick Link.
So we removed and recreated the Quick Link, to make sure there was nothing wrong with it. However, the problem remained, but could still only be recreated when the customer was controlling the session.
It was then that I noticed that when the customer opened SmartList it was not displaying any data or headings and showed “Stopped” in the status. See the screenshot:
So I thought it could be related to background processing (because I know that SmartList uses background processing to populate the window). However, if I used Process Monitor (from the Microsoft Dynamics GP menu) and Suspended the background processing queue, the status was not updated at all. Once I resumed background processing, it would show a status of Stopped.
Then I noticed the final bit of the puzzle that lead to identifying the cause.
When the customer opened SmartList using the Quick Links, the Search [Not Found] window was opened immediately…. before the customer clicked on the Search button or double clicked on a SmartList Favourite to open the window.
I also noticed that while the Search window was open, any SmartList Favourite selected would return no data and show a status of Stopped. Once the window was closed, SmartList would function normally.
So why was the Search window opening along with the SmartList window?
When you first open SmartList, before you select a Favourite, the Search Button is disabled, so there is no way to click on it. However the Search window was opening and it was showing [Not Found] as no SmartList favourite had been selected.
When the customer manually opened the Search Window, the already open window was just brought to the foreground, so it appeared that it was opening incorrectly.
So, why would it make a difference which button or link was used to open SmartList?
Below is a screenshot showing the SmartList Quick Link and the SmartList Toolbar button:
And below is a screenshot showing the SmartList window immediately after it was opened. Notice the position of the Search button:
Have you worked it out yet?
What we could not “see” from the screen sharing session was that the customer was double-clicking on the SmartList Quick Link. The first click would open the window and the second click would click on the Search Button before the code had time to disable the button. The Search window would be opened and as no SmartList Favourite was selected it would say [Not Found] and not have any columns to show.
The issue was occurring because the following factors were all aligned (literally):
- The customer was double-clicking on the Quick Link hyperlink.
- The SmartList Quick Link was in the top left corner.
- The SmartList window was opening in the top left corner.
- The Search Button was appearing directly above the SmartList Quick Link.
- The Search Button was enabled for a fraction of a second before the code disabled it.
Now that we had the cause we checked by on the GP 2010 system and found that the position of the SmartList window when it opens was different and the “second” click was on a blank area of the window where it would have no effect.
We suggested that the customer stop double-clicking on the Quick Links hyperlinks. Like hyperlinks in an internet browser, only a single click is needed.
Hope you found this interesting.
PS: Once we knew what was happening, we saw similar issues with other windows when they were opened by double-clicking on Quick Links. For example: a “Not all Required Fields have been entered” dialog when the Save Button was “second” clicked.
This article was originally posted on the Developing for Dynamics GP Blog and has been reposted on http://www.winthropdc.com/blog.