Dynamic Code Blocks

Microsoft Dynamics GP & .NET technical Blog by Tim Wappat

Implementing the Microsoft Dynamics GP Web Client–Book Review

Implementing the Microsoft Dynamics GP Web ClientERP systems are migrating to the near zero deployment of web browser delivery and consumption. With Microsoft’s release of the GP Web Client, Dynamics GP is now no exception. Ian Grieve has produced a book that brings lucidity to the process of installing and configuring the GP Web Client and server.

Ian is a figure well known in the Dynamics GP community and has been recognised as such by the awarding of Microsoft MVP (Most Valuable Professional) status. In this book Ian imparts his wealth of experience and disseminates the knowledge he has brought back from the field, where he is working as a busy Dynamics consultant. In his role he has been exposed to an assortment of company requirements and environments that has helped shape this book.

I read the book whilst preparing for my first web deployment. I was grateful for the help with the daunting, multifaceted nature of a Dynamics GP Web Client and server install. The book is excellent for the impatient or time pressed professional needing to get up to speed quickly with this new member of the Dynamics GP system. The pages provide a well-lit path through the process of getting to a functional GP Web Client and server install, quickly and without having to wade though manuals and online guides.

The structure of Ian’s book breaks the system down, addressing each part separately, in a step by step manner. It is rich in supporting screen shots, providing continuous reassurance at each step, feeling much like a colleague has provided you with a much toiled over build script. Although it is valuable to the configuration and installation of the GP Web Client, the book may also facilitate

in comprehending an overview of the install for system administrators too.

Subjects covered also include those important to the end user such as integration with Microsoft Office applications and SQL Server Reporting Services through Silverlight. The limitations of the Web Client are also covered together security set ups. I must praise the inclusion of a troubleshooting section, inevitably needed in any complex server system for configuration and on-going reference.

Dynamics GP is a little sparse in supporting professional grade technical literature, it is good that Ian has written this solid guide to help address that shortage.

Review by T.Wappat

Buy Implementing the Microsoft Dynamics GP Web Client by Ian Grieve


How to bring seasonal joy to your GP users

Seasonal Splash Screen

The network team since I can remember have introduced seasonal splash screens to our Dynamics GP screen through the month of December. Usually with a warm message from the IT team. A couple of years there were 24 different splash screens, each one switched via the login script, one for each day… count down to Christmas!

Below is what you could do, I threw it together as an example, although the ones the team do are far more fun, but it would be unfair to post the images here without permission!

splash1100 Christmas

How is it done?

Essentially if you drop a splash.bmp into the GP application directory, it will be displayed on startup. If no file is present, then an embedded splash screen is shown by default.

You can use a powershell script or batch file at login to switch the bitmaps intelligently as desired.

David Musgrave covers the detail of how to do this in his post Customise the Microsoft Dynamics GP Splash Screen where he also points to GP splash images over the years which is also worth a look.

So give it a go, you can grab the starting bitmap from one of those posts and embellish it as you see fit. Obviously you could be boring and add your support details on there or promote helpdesk open times or whatever!

Happy holidays!

Dynamics GP real time EU tax registration number validation using VIES

Member states of the European Union expose thier VAT (Tax Registration Number) validation to the masses via VIES. Below is an example using Amazon’s VAT registration details against the service on the EU website.



Here the member state to which the organisation belongs has been selected, then the VAT number has been entered allowing for validity check. In the next screen we see the response to clicking the verifty button.


– open data goodness! - now for the cool bit…


If you hunt under the FAQ, buried in there, it turns out there is a SOAP webservice available that does the same thing!


This WSDL URL is our key to some great functionality for Dynamics GP.

In Visual Studio For Dynamics GP Add-in project create a WCF reference to the VIES SOAP webservice.
In your proxy class you will find checkVatPortTypeClient.CheckVat as a method. This is the one we are after, supply the parameters and by reference the results will be returned

. image

We then create a visual studio add in event handler to fire on the user leaving the Tax Registration field of relevant forms in GP. Hence we can validate the VAT number the user has entered! So in our Add in project in the event handler for the options window Tax Registration Field we handle the event.

Public Shared Sub TaxRegNumberValidateBeforeOriginal(Sender As Object, e As System.ComponentModel.CancelEventArgs)
Dim CustomerMaintOptionsForm As MicrosoftDynamicsGpModifiedDictionary.RmCustomerMaintenanceForm.RmCustomerOptionsWindow = _
If Not CustomerMaintOptionsForm.TaxRegistrationNumber.IsEmpty Then
If Windows.Forms.MessageBox.Show("Remember to update address intrastats field too." & vbCrLf & "Do you want to validate this number?", "Validate?", _
Windows.Forms.MessageBoxButtons.YesNo, Windows.Forms.MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
Using oVATNumberValidationForm As New VATNumberValidation
oVATNumberValidationForm.VatNumber = CustomerMaintOptionsForm.TaxRegistrationNumber.Value
If oVATNumberValidationForm.ShowDialog() = vbOK Then
e.Cancel = True
e.Cancel = True
End If
CustomerMaintOptionsForm.TaxRegistrationNumber.Value = oVATNumberValidationForm.VatNumber
End Using
End If
End If
Catch ex As Exception
Windows.Forms.MessageBox.Show("TaxRegNumberValidateBeforeOriginal" & vbCrLf & ex.ToString)
End Try
End Sub

Using the address of the company being looked up, we select the state code from the combo box (could automate this), we then supply to the webservice on hitting the validate button. A windows form shows the results of the validation to the user. If the supplied details fail validation we show the windows form to the user so they can correct the issue and try again. On closing the form we update the Tax Registration Field.


Private Sub btnValidate_Click(sender As System.Object, e As System.EventArgs) Handles btnValidate.Click
If txtVATNumber.Text.Length > 0 And cbxMemberState.SelectedIndex <> -1 Then
Dim oStringBuilder As New Text.StringBuilder
Dim o As New VATChecker.checkVatPortTypeClient
Dim ovalid As Boolean
Dim oName As String = String.Empty
Dim oAddress As String = String.Empty
Dim oResult As String = String.Empty
Dim oSelectedCountryCode As String = CStr(cbxMemberState.SelectedItem).Split(CChar(("-")))(0)

oResult = o.checkVat(oSelectedCountryCode, txtVATNumber.Text, ovalid, oName, oAddress)
If ovalid Then
txtResults.Text = oStringBuilder.ToString
txtResults.Text = "INVALID"
End If

Windows.Forms.MessageBox.Show("Enter VAT number and select member state")
End If

End Sub


This is a rough example, the webservice call can be asynchronous, the country code derived from addresses, more error checking and neater presentation of the results, window could be derived from Dex windows for familiar Dex styles, however this post is more about what is possible in twenty mins with Dynamics GP plugins and data opened to the world via webservices.

Optionally, if the details of the your company are passed to the service (state & VAT number), then a consultation number is returned which is proof that you have looked up and validated the VAT number should you be challenged on that fact, but this is optional.


Different countries have maintenance windows where this service will not work check the VIES website for details

Task Scheduler and COM automation

Note to self:

The solution for this appalling BUG in Microsoft IIS & Excel is terrific:

  1. Create directory "C:\Windows\SysWOW64\config\systemprofile\Desktop " (for 64 bit Windows) or "C:\Windows\System32\config\systemprofile\Desktop " (for 32 bit Windows)
  2. Set Full control permissions for directory Desktop (for example in Win7 & IIS 7 & DefaultAppPool set permissions for user
    "IIS AppPool\DefaultAppPool")