Codename GP "12" Preliminary Features Series – 1 of 4

November 17, 2011

Codename GP “12” Preliminary Features – Part 1 

This is article is part 1 of 4 from the series Codename GP “12” Preliminary Features. Some images and content reproduced with express permission from Microsoft Business Solutions, a division of Microsoft Corporation.

DISCLAIMER: These features are subject to change.

I am only repeating what I have heard so please don’t shoot the messenger. With GP “12” to be released “sometimes next year” – and yes, December 31, 2012 is still within that time frame – there may still be features on the following list that may not make the cut. However, it was fairly clear that the boys and girls on the Microsoft Dynamics GP development team in Fargo are working their rears off to get the feature list to a state where they feel pretty comfortable, meeting the demands on the shopping list.

Straight out of GPUG Summit’s closing session, comes some of the top features being worked on, based on the traditional 4 pillar goals:

4 Core Design Pillars

Each pillar allows the engineering team to showcase a list of features that will support the objectives behind pillar.


The PM Reprint Check Remittance, for instance, will allow users to re-print the check remittance without having to generate the check.

Improvements have also been considered for the FA Calendar Setup feature. In this case, the Fixed Assets calendar does not have to match the fiscal calendar. You can now have multiple calendars, for example, having an asset depreciate on a fiscal year for tax purposes, if tax year and fiscal year are different, and depreciate calendar year for financial reporting purposes.
The Journal Entry History Inquiry will see enhancements too. In today’s world, the existing window only looks at the open tables. The plan for GP “12” is to have it look at both open and/or history.

In the reporting area, you will be delighted to know that you will now be able to choose a printer at print time. This feature was only 20 years in the making, but it’s finally here! Hey, I remember like if it was yesterday, when Windows True Type fonts became a standard part of Report Writer reports. Before that, we only had 4 fonts to play with. Challenge: name the 4 fonts available prior to the introduction of True Type fonts.

SSRS Simplicity

In addition to the printer at print time, one of the most awaited features is the ability to print SSRS reports from right within Microsoft Dynamics GP, this is, you will no longer need to wait for the Internet Explorer browser to load Report Server to display the report and will rather see the report from within GP as if you were looking at a Report Writer report in the report layout window… ah, and before I forget, Report Writer will eventually be phased out as the predominant options to render reports.

I don’t know how this plays with all that Word Template functionality released fairly recently, but I am sure a lot of you will jump on one feet in happiness knowing that you no longer will need to suffer through the tortuous process of customizing a report. My instinct tells me, that Report Writer will mainly subsists as a data delivery mechanism for XML files needed for your beloved Word Templates. If history and memory serve me well, Microsoft rarely gets rid of a working function within its products, except it becomes as annoying as the Office Paperclip Assistant. Now that I come to think, Report Writer is got to be up there for a lot of you.

I will continue tomorrow with the Productivity pillar.
Until next post!

Mariano Gomez, MVP
IntellPartners, LLC


More Microsoft Dynamics GP Word Templates Articles

July 7, 2011

If you have been keeping up with this blog, you will remember that sometimes around October of 2010 I posted a series of articles related to Microsoft Dynamics GP Word Templates – see Microsoft Dynamics GP 2010 Word Templates summary for more information. These articles focused on “how to’s” and troubleshooting aspects of Word Templates.

Now the Dynamics Support and Services Team Blog has decided to launch a new set of video-articles detailing more common aspects of working with Word Templates. You can now visit the Community Team blog for the release article and the schedule of when these videos will be out. The good news is the first two are out!

Take a look at:

Adding the Developer tab in Microsoft Word after installing the Microsoft Dynamics GP Add-in for Microsoft Word – Video

Helpful tips when modifying Word Templates in Microsoft Dynamics GP 2010 – Video

Please visit the Dynamics GP Support and Services Blog for these videos and to find a collection of very new and interesting articles.

Until next post!

Mariano Gomez, MVP
IntellPartners, LLC

>Why my template changes don’t save when I close Microsoft Word?

February 7, 2011

>If you are now a user of Microsoft Dynamics GP 2010, you will concur that the new Word Templates feature is probably one of the most visible improvements over version 10.0 as it has made the delivery of ‘facing’ documents a pleasant one.

However, the new feature has not come without misunderstandings on how it works. One such misunderstandings has to do with the way template documents are opened, changed, and saved. Many users have found out the hard way that there’s a bit more to just hitting the save button in Microsoft Word. So, let’s review the few critical steps of opening a Word Template and ensuring that all changes are properly saved in Microsoft Dynamics GP, in the process, I will explain what happens “under the hood”.

1. In the following example, I have taken a new template created for Aaron Fitz Electrical (AARONFIT0001) based on the original SOP Blank Invoice Form and have opened it and added a logo to it.

SOP Blank Invoice Form Template – AARONFIT0001

Upon opening the template (by clicking the Modify button), Microsoft Word automatically creates an image of the template in the user’s local temp folder.

Template image in %temp% folder

In this scenario, and to simulate the subject of this post, we will proceed and save the template — assuming the logo is all we wanted to add to the template. Microsoft Word will save the document as it would normally do with any other document. We then proceed to close Microsoft Word.

Upon revisiting the %temp% folder. The modified template is no longer available.

Template is no longer available after closing Microsoft Word

Hence, if you were to print the SOP Blank Invoice Form — assigned to customer Aaron Fitz Electrical — from within Microsoft Dynamics GP using the Template report, chances are the system would revert to the standard template as the changes would not be found.

In order to overcome this issue, here are the correct steps to have your templates available all the time:

1. Upon completing the modifications of the template in Microsoft Word, save your templates under your My Documents folder. If your templates are going to be used by all users in your environment, save the template to a network shared folder.  In any case, use the Save As option in Microsoft Word to save your document.

Save As to save template document

NOTE: if you are also going to use logo images with your templates, be sure to save these also on a shared folder.

2. Upon saving the template, you will now use the Add button to re-add the template you have just previously saved. This will now ensure that all your changes are imported and stored in Microsoft SQL Server.

Add template

That’s it for avoiding a major headache with the loss of a very customized Microsoft Word template.
Until next post!

Mariano Gomez, MVP
IntellPartners, LLC

Enabling a Report Writer document as a Word Template

December 6, 2010

Ok, this is directly or indirectly a Report Writer subject, but nonetheless a topic related to Report Writer. In this example, I take the General Posting Journal transaction document and enable it under Word Templates. However, this example will not develop the Word Template itself, but rather show how easy it is to make the journal document template enabled.

The steps are very simple and in fact, with a little bit of creativity, a developer could potentially write code that quickly enables critical reports.

To enable an existing Microsoft Dynamics GP report:

1. Register a trigger against the IsTemplateEnabledReport() function of the syReportLookup form. Template enabled reports can be selected in the Reports lookup window.


{ Created by Mariano Gomez, MVP
This code is licensed under the Creative Commons
Attribution-NonCommercial-ShareAlike 2.5 Generic license.
local integer l_result;

pragma (disable warning LiteralStringUsed);

l_result = Trigger_RegisterFunction(function IsTemplateEnabledReport of form syReportLookup, TRIGGER_AFTER_ORIGINAL, function glPostingJournalReport);
if l_result <> SY_NOERR then
warning "Trigger registration for General Posting Journal report failed.";
end if;

pragma (enable warning LiteralStringUsed);

Note: You will need to save the Startup script first (CTRL+S), and compile the dictionary when the trigger processing function is implemented.

2. Now that we have our Startup script and the trigger registered, we can implement the trigger processing function. In this case, I have labeled this function glPostingJournalReport().


{ Created by Mariano Gomez, MVP
This code is licensed under the Creative Commons
Attribution-NonCommercial-ShareAlike 2.5 Generic license.
function returns boolean result;

in 'Product ID' nProdID;
in Resid nResID;

if nProdID = DYNAMICS then

{It's our report. Indicate that it is template enabled.}
case nResID
in [resourceid(report 'General Posting Journal')]
result = true;
end case;
end if;

Note: In the above code I am using the dictionary constant DYNAMICS for the product ID as our report belongs to the core dictionary. Also, rather than hardcoding the resource Id for the report, I am using SanScript’s resourceid() function to obtain the resource Id for the report.

3. Open Dexterity Utilities to extract and autochunk your dictionary into a final product. The following are the settings I used for this particular project:

Auto-Chunk and Product Information windows

4. Drop your chunk file in the Dynamics GP folder and make sure that you can see your trigger in action in the Reports lookup window under Report Template Maintenance.

Reports Lookup window

Now that we have won half the battle, I will show in my follow up post, how to actually implement the template and make it all work together.


Extracted dictionary – Click here
Chunk file – Click here

Until next post!

Mariano Gomez, MVP
Maximum Global Business, LLC

Microsoft Dynamics GP 2010 Word Templates summary

October 1, 2010

Microsoft Dynamics GP 2010 Word Templates offer new presentation capabilities to the traditional customer/vendor facing Report Writer reports. This week was just a superficial scratch of the myriads of things that are possible to achieve. Like with everything else, I am sure there are limitations, but it will take some time to discover what those are. Nonetheless, I will continue exploring this topic and bring to you my findings

Articles Covered

How to add a “Terms and Conditions” page to a Microsoft Dynamics GP Word Template document
Debugging Microsoft Dynamics GP 2010 Word Templates
How to resize logo in Microsoft Dynamics GP Word Templates
The Open XML SDK 2.0 for Microsoft Office


I have to thank Microsoft’s Rob Wagner for his invaluable support and guidance throughout the week. Rob also provided the cool code and pointed to the online resources available on the Open XML subject.

Until next post!

Mariano Gomez, MVP
Maximum Global Business, LLC

The Open XML SDK 2.0 for Microsoft Office

October 1, 2010

Along with the introduction of Microsoft Dynamics GP 2010 Word Templates came a little known software development kit: Open XML SDK 2.0.

Open XML is an open ECMA 376 standard and is also approved as the ISO/IEC 29500 standard that defines a set of XML schemas for representing spreadsheets, charts, presentations, and word processing documents. Microsoft Office 2007 and Microsoft Office 2010 all use Open XML as the default file format for rendering spreadsheets, documents, and presentations.

The Open XML file formats are useful for developers because they use an open standard and are based on well-known technologies: ZIP and XML.

The Open XML SDK 2.0 for Microsoft Office is built on top of the System.IO.Packaging API and provides strongly typed part classes to manipulate Open XML documents. The SDK also uses the .NET Framework Language-Integrated Query (LINQ) technology to provide strongly typed object access to the XML content inside the parts of Open XML documents.

In the case of Microsoft Dynamics GP 2010, the assembly enables developers to easily read-from and write-to Microsoft Word documents using their favorite language in Microsoft Visual Studio. The following image depicts the assembly in the Global Assembly Cache (GAC).

You can find more examples and a cool tool available at the Open XML SDK 2.0 download site. Using this tool, Rob Wagner was able to compare the original template shipped with GP and the modified version I created, when troubleshooting some issues I was having when adding a new section to the original template – see Debugging Microsoft Dynamics GP 2010 Word Templates.
Using the Open XML to work with Word documents

The following C# console application demonstrates how to use OpenXML to add a new table to the end of a document (similar to the text added in the “terms and conditions” article).

//  This file is a Microsoft Dynamics GP Business Intelligence Code Sample.
//  Copyright (C) Microsoft Corporation.  All rights reserved.
//This source code is intended only as a supplement to Microsoft
//Development Tools and/or on-line documentation.  See these other
//materials for detailed information regarding Microsoft code samples.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using DocumentFormat.OpenXml;
using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml.Wordprocessing;
using wp = DocumentFormat.OpenXml.Wordprocessing;

namespace NewTableAdHocText
    class Program
        public bool AddTableAdHocText(string WordDocPath, string TextPath)
                //read the ad-hoc text and store it for later
                StreamReader srStreamReader = new StreamReader(TextPath);
                String sString = srStreamReader.ReadToEnd();

                //open the word document and it's main document part
                using (WordprocessingDocument wdWordDoc = WordprocessingDocument.Open(WordDocPath, true))
                    MainDocumentPart mdpWordDocMainPart = wdWordDoc.MainDocumentPart;
                    //create then add a new paragraph
                    wp.Paragraph wppParagraph = new wp.Paragraph(new wp.ParagraphProperties(new wp.ParagraphStyleId() { Val = "NoSpacing" }));
                    //create new markup for the table
                    Table wppTable = new Table(
                        new TableProperties(
                            new TableStyle() { Val = "TableGrid" },
                            new TableWidth() { Width = "0", Type = TableWidthUnitValues.Auto },
                        new wp.TableBorders(
                            new TopBorder() { Val = BorderValues.None },
                            new LeftBorder() { Val = BorderValues.None },
                            new BottomBorder() { Val = BorderValues.None },
                            new RightBorder() { Val = BorderValues.None, },
                            new InsideHorizontalBorder() { Val = wp.BorderValues.None },
                            new InsideVerticalBorder() { Val = wp.BorderValues.None }),
                        new TableLook() { Val = "04A0", FirstRow = true, LastRow = false, FirstColumn = true, LastColumn = false, NoHorizontalBand = false, NoVerticalBand = true }),
                        new TableGrid(
                            new GridColumn() { Width = "11016" }),
                        new TableRow(
                            new TableCell(
                                new TableCellProperties(
                                    new TableCellWidth() { Width = "11016", Type = wp.TableWidthUnitValues.Dxa }),
                                    new Paragraph(
                                        new ParagraphProperties(
                                            new ParagraphStyleId() { Val = "NoSpacing" },
                                            new KeepLines(),
                                            new PageBreakBefore(),
                                            new ParagraphMarkRunProperties(
                                                new RunFonts() { Ascii = "Trebuchet MS", HighAnsi = "Trebuchet MS" },
                                                new FontSize() { Val = "17" },
                                                new FontSizeComplexScript() { Val = "17" }),
                                            new LastRenderedPageBreak(),
                                            new Run(
                                                new RunProperties(
                                                    new RunFonts() { Ascii = "Trebuchet MS", HighAnsi = "Trebuchet MS" },
                                                    new FontSize() { Val = "17" },
                                                    new FontSizeComplexScript() { Val = "17" },
                                                new Text(sString)))))))); //text for the run comes from the adhoc text document
                    //add then save the table to the document
            catch (Exception e)
                return false; //failure
            return true;

        static void Main(string[] args)
            new Program().AddTableAdHocText(args[0], args[1]);

The above example shows how simple it is to:

1) Crack open a word document.
2) Append a table to the end with specific properties.
3) Insert some ad-hoc text into the table.

The major advantage is the strongly typed interface to office document. You don’t need COM interoperability to manipulate any document.

You can download the sample project at the bottom of this article.

Downloads – C# command line application to demonstrate adding a table at the end of a Word Document.

Until next post!

Mariano Gomez, MVP
Maximum Global Business, LLC

How to resize logo in Microsoft Dynamics GP Word Templates

September 30, 2010
Getting used to the new Word Templates functionality can be a bit challenging at times. One of those challenges came in the form or a simple question: “How to resize the logo on the template?”. One thing to keep in mind is that most objects on a Microsoft Dynamics GP Word Template document live inside of content controls. With that said, here are the steps to achieve this, taking the SOP Blank Invoice Form Template* as an example:

1. Under Report Template Maintenance, select the SOP Blank Invoice Form template from the More Reports list.
2. Click the New button to create a new template. For this example, we will create the template based on the existing template and we will call it SOP Blank Invoice Form Icon. Click Ok to continue.
3. Highlight the newly created template, then click the Modify button to open Microsoft Word.

4. Click on the Picture content control to add a logo image.

Note: This image must also exist in the Image library under Template Configuration.

5. Select the logo, right-click, and chose Remove Content Control.

6. Highlight the image and resize accordingly. The following is a sample of the resized image with some extra text to go along:

NOTE: The logo is part of the Header section of the document.

7. Save the modified template to a different directory where it can be imported from later on, for example, My Documents. Close Microsoft Word.

8. Back to Report Template Maintenance, click the Add Template button and select the newly modified template from the My Documents folder. Replace the existing one when prompted.

9. Click the Assign button, then mark the company you want to assign the template to. Then, click on Set as Default to make the new template the default template for the company. Click Save to continue. Click Save to continue.

10. Back to the Report Template Maintenance window, highlight the original template and click the Assign button and choose Company. Unmark the company and choose Save.

NOTE: This will ensure that the copied version of the original template prints always.

11. To test, select a SOP invoice and print.

Hope you found these steps simple to follow and that you are enjoying the new Word Templates feature in Microsoft Dynamics GP 2010.

Until next post!

Mariano Gomez, MVP
Maximum Global Business, LLC