Prevent Change Of User Date

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.

Ian Grieve

About Ian Grieve

Ian is a Microsoft Dynamics GP certified consultant specialising in the delivery of Microsoft Dynamics GP projects and currently working for Perfect Image Ltd., a Microsoft Partner and VAR in the North East of England. Ian has worked with Microsoft Dynamics GP since 2003 and, over the nine years since, has dealt with all aspects of the product life-cycle from presales, to implementation, to technical and functional training, to post go-live support and subsequent upgrades and process reviews. In his spare time, Ian runs the azurecurve | Ramblings of a Dynamics GP Consultant blog dedicated to Microsoft Dynamics GP and related products.
This entry was posted in Dynamics, GP, Microsoft, Modifier with VBA and tagged , , , , , , . Bookmark the permalink.

6 comments on “Prevent Change Of User Date

  1. Pingback: Prevent Users from changing User Date - gp2themax - GP Technical Blogs - Microsoft Dynamics Community

  2. Pingback: Prevent Users from changing User Date : Interesting Findings & Knowledge Sharing

  3. Wouldn’t it be a simple solution to just remove access to this window for normal users, by using standard Security Task setup? When a user try to open User Date window and read the message “You do not security privileges to open this window…..”, I am sure that would send him/her a loud message (that he/she is NOT suppose to change the User Date at all).

    • Seems I’ve been doing too much with with modified windows recently so everything started to look like a nail (when all you have is a hammer etc.).

      As you say, altering the security would do exactly the required action.

  4. Pingback: Prevent Change Of User Date | azurecurve – 1/2, DynamicAccounting.net | Partner Compete

  5. Pingback: Prevent Change Of User Date | azurecurve - DynamicAccounting.net - GP Technical Blogs - Microsoft Dynamics Community

Leave a Reply

Your email address will not be published. Required fields are marked *

*

* Copy This Password *

* Type Or Paste Password Here *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>