Fred Webb posted a question on the Dynamics GP Community Forum asking if it was possible to prevent the User Date being changed in Dynamics GP 2010.
One response was to use Field Level Security which would work but seems a little excessive. I had a think on alternatives and, because we’re dealing with GP 2010, the one I came up with was to prevent the User Date window being opened by using a little VBA.
The package for Microsoft Dynamics GP 2010, which also works for Microsoft Dynamics GP 2013, can be downloaded at the bottom of the post.
The VBA I used was:
Private Sub Window_BeforeActivate()
Me.Close
End Sub
Private Sub Window_BeforeOpen(OpenVisible As Boolean)
Me.Hide
End Sub
Me.Hide causes the UserDate window to be hidden from the user as it starts to open, and Me.Close forces it to close.
I could have put both the Me.Close and Me.Hide in the sub Window_BeforeOpen, but I found the main GP window didn’t get focus back. By splitting the Me.Close into Window_BeforeActivate focus was returned to GP when the UserDate window was closed.
The downside of using VBA asa solution is that it will not work with the Microsoft Dynamics GP 2013 Web Client, although it will work with the standard 2013 client.
[wpdm_file id=5]