Dynamics GP Word Templates References

To get going with Dynamics GP Templates visit these references they will save your day:

Ajit Kurian's Dynamics ERP & SQL Blog - Working with Word Templates in GP 2010

Turning on the gridlines will make it easier to move fields around the layout to see how they will line up with the fields that are already on the report.

Under the developer tab there is an option to show the template in design mode.  Once this change is made you will see the field display that is on the template along with the content control of the field.  This makes the report a little more difficult to read and doesn’t need to be turned on, but when we get to deleting fields on the template it can be useful.

Developing for Dynamics GP - Word Template Debugging

DEX.INI settings


When you have these settings in your dex.ini, multiple files will be created in the %temp% folder:

  1. Log file
  2. The Document
          - Fabrikam, Inc. Invoice [-STDINV2322-]2011.02.23_16;07;27 ~1-1.docx
  3. The Template
          -Template Invoice 1~1 1~1.docx

Dynamics GP Blogster - Debugging Microsoft Dynamics GP 2010 Word Templates

The Dynamics GP Blogster - Debugging Microsoft Dynamics GP Word Templates Revisited

VEIS Webservice matchcode error

Something changed this week with the VEIS web service that provides validation of European tax registration numbers.


All of a sudden we get an error! The SOAP error on deserialization is:

'Invalid enum value '3' cannot be deserialized into type 'canford.checkVATWebservice.matchCode'

I regenerated the SOAP reference in Visual Studio, -still not working.

It seems the soap response is containing an invalid (according to the WSDL) value of 3 for the type match code that is returned.

I’ve emailed the address provided for support, no response yet, so to get us running again I’ve added in this as a valid enum, however I have no idea of what the value of 3 actually means!

To fix, edit the Reference.vb file generated after refreshing the reference, found under your service reference directory,  (this example in VB.NET)

<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", ""),  _
System.Runtime.Serialization.DataContractAttribute(Name:="matchCode", [Namespace]:="urn:ec.europa.eu:taxud:vies:services:checkVat:types")> _
Public Enum matchCode As Integer

<System.Runtime.Serialization.EnumMemberAttribute(Value:="1")> _
_1 = 0

<System.Runtime.Serialization.EnumMemberAttribute(Value:="2")> _
_2 = 1

End Enum



<System.Runtime.Serialization.EnumMemberAttribute(Value:="3")> _        _3 = 2
to give this:
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", ""),  _
System.Runtime.Serialization.DataContractAttribute(Name:="matchCode", [Namespace]:="urn:ec.europa.eu:taxud:vies:services:checkVat:types")> _
Public Enum matchCode As Integer

<System.Runtime.Serialization.EnumMemberAttribute(Value:="1")> _
_1 = 0

<System.Runtime.Serialization.EnumMemberAttribute(Value:="2")> _
_2 = 1

<System.Runtime.Serialization.EnumMemberAttribute(Value:="3")> _
_3 = 2
End Enum

Now it will work again. I expect this will be fixed sometime after this post, but for those of you struggling with this issue at least you know what to do now!

update 9th Jan 2015

Refresh of references today brought in the “missing” enum – I guess it is fixed.

<xsd:enumeration value="3">

SQL OUTPUT Clause to move Dynamics GP prices to history

FROM iv00108_history;




--select * from iv00108_history
FROM iv00108_history;

Create a history table with the same schema as the live table (might want to remove the indexes to keep size down).

Use the above script, supplying the price list name to move the prices from the live IV00108 table to the new custom table IV00108_history.

This moves the records in batches of 1000 to keep the transaction locking under control in the database. If too much information is locked (selected) we start going from row locks to page locks into table locks. Performance goes at and users start to complain at that point. The price table has three million rows in it so this is a wise precaution.

Visual Studio Auto Shelve Extension

Quality and finance audits

In your annual audits, as a software manager the question always crops up of how is work in progress protected? All the project source code is normally safely locked away in team foundation server. The Team Foundation Server is in turn backed up and backup shipped off site. What about drive failure on the local developer machine? Normally hours or days of work could be lost since the last check was performed!
My answer to this is to use Auto Shelve extension and a weekly machine backup of my development machines.

Auto Shelve protects work loss from drive failure since last checkin

Auto shelve is a Visual Studio extension that periodically & automatically shelves your pending changes into source control as you work. It does this in background and so has minimal impact. Should my SSD drive fail catastrophically, work since my last check in will have been preserved in a shelf set in the team foundation server.


After setting it up, Auto Shelve keeps overwriting the shelf set with the latest pending changes. After using it for some time now I can say it is effortless backup and I love it. I will love it even more when the day comes that I have a disaster on my hands.


Install it through Tools>>Extensions and Updates

Search on the online node to the left, for autoshelve and install.

Go to the settings to set up your shelf set name and the frequency of shelving.