Tuesday, January 28, 2014

Word Templates: We can't open template because we found a problem with its contents

Just recently I was working on a Sales Invoice Word Template customization for a customer and ran into a strange issue when attempting to print a batch of invoices for customers assigned to this template.

When printing the entire batch of invoices, the following error would appear:


Once the OK button was clicked, Word would proceed to display the following error message: "Word found unreadable content in "Template.docx". Do you want to recover the contents of this document? If you trust the source of this document, click Yes.".


Upon clicking the Yes button, Word would go to work and "recover" the document in perfectly good condition with the invoices matching to the penny.

What makes this even more puzzling is, if you print each invoice individually from the Sales Transaction Entry window, there would be no error and invoices would print fine.

Solution

To troubleshoot this issue, one just needs to focus on the original error - I assume the second error is simply a consequence of the first - specifically, on the Details where Word is specifically complaining about the header6.xml section. Also, part of finding the solution is understanding how the actual documents are generated from the templates.

To render a report from a template, Microsoft Dynamics GP uses Open XML, which uses a set of APIs to stream data into ZIP and XML standards - a DOCX is nothing more than a structured zip file containing a bunch of XML documents that define the structure and content of the document in question. The vehicle to stream the data into a template of course, is Report Writer.

With that said, when you look at the error, it clearly indicates that there's an issue with the way part of the formatted XML is being generated (as referenced by header6.xml). Troubleshooting 101, always suggests to test a standard unmodified template to see if the behavior persists and compare the standard unmodified template to the modified template causing the issue.

In looking at the original template, I immediately identified the difference between the original body section of the template...

Original Template

... and what my modified template was showing:

Modified Template of Original

As you can tell, the modified section of the body is missing the Serial/Lot and Item Notes row sections. When Microsoft Dynamics GP tries to stream data from Report Writer to the template, it is clear that this missing section will cause the XML data to be formatted incorrectly since the data exist in the stream, but there's no matching elements on the template. Since each section of the document is written one at a time and document by document, the resulting DOCX is saved each time each section is completed. Once the DOCX construction is finished, it will finish with an error message, which immediately forces Microsoft Word to go into recovery mode. Nonetheless, the recovery is of the last save operation, which still brings up the document.

Now, when an individual document is printed, it would seem that all XML tags are closed regardless of whether the data stream could be written to the appropriate template section. This is probably why no error is produced when an individual document is printed.

The solution in this case was to recreate the template and leave the previously removed sections intact. In my customer's case, they had no serial numbers to worry about, but had the occasional note that will print, so leaving these in the document was probably a good idea to begin with.

Until next post!

MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/

Monday, January 27, 2014

Dynamics GRC Day 2014 - All about security, risk, and compliace in your Microsoft Dynamics environment



Feel like you don't have enough conferences and sessions on your schedule for your trip to Microsoft Convergence 2014 Atlanta? If so, you may want to arrive a couple days earlier to join the Dynamics GRC Day 2014 conference hosted by FastPath and Protiviti and featuring some great community speakers. Plan on attending this one of a kind conference March 3, 2014 in Atlanta. Join leading Microsoft Dynamics industry experts to learn about key issues and strategies surrounding security, risk, audit, compliance and governance. This daylong meeting is critical for anyone that is responsible for risk management in a Microsoft Dynamics environment.

Until next post!

MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/

Friday, January 24, 2014

Microsoft Dynamics #CONV14 Atlanta - My sessions are out!



Hi all!

Microsoft Dynamics Convergence 2014 Atlanta is around the corner! Unbelievable to think just a few days aback I was sending out New Year's greetings and now we are talking about an event to be held in March, a month and few days away. Where has time gone?

Nonetheless, I still have some work to do to finalize my slide decks and demos for my sessions, but you won't be able to tell from my excitement about participating at this Convergence. I wanted to share with you the sessions I will be presenting and, of course, ask for your support with your attendance.

CodeSessionRoomDate and Time
CSGP014Microsoft Dynamics GP Customization for Beginners
Concurrent Session

Are you thinking of customizing your Microsoft Dynamics GP solution? Are you familiar with the tools available to create customizations? Come to this session to learn important tips to make a customization project successful and how to use the top tools for customization including Microsoft Dexterity, Visual Studio Tools for Microsoft Dynamics GP and Modifier with Visual Basic for Applications.
A402-403Wednesday, March 5, 2014

11:00 AM - 12:00 PM
CSGP008-R1Microsoft Dynamics GP 2013: Upgrading and deploying the fun way
Concurrent Session
Thinking about upgrading to Microsoft Dynamics GP 2013? You need to be at this session! Learn how the upgrade process works, including important system changes you need to be aware of when you upgrade. We'll review the steps, especially with named system database, multicurrency and other factors.
Sydney Marcus AuditoriumWednesday March 5, 2014

3:30 PM - 4:30 PM
CSGP008-R2Microsoft Dynamics GP 2013: Upgrading and deploying the fun way
Concurrent Session
Thinking about upgrading to Microsoft Dynamics GP 2013? You need to be at this session! Learn how the upgrade process works, including important system changes you need to be aware of when you upgrade. We'll review the steps, especially with named system database, multicurrency and other factors.
Sydney Marcus AuditoriumThursday March 6, 2014

11:00 AM - 12:00 PM
IDGP003-R1Ask your peers: Cloud and web client technologies
Interactive Discussion
Mariano Gomez, Greg Frick, Todd Schultz, Tom Monfre
Would you like to add new technologies to your existing environment to give you a better solution at a reduced cost? Participate in this discussion and learn how other users have leveraged or are planning to leverage cloud technologies and the web client. This session is hosted by the Microsoft Dynamics GP User Group.
A316Thursday March 6, 2014

2:00 PM - 3:00 PM
IDGP003-R2Ask your peers: Cloud and web client technologies
Interactive Discussion
Mariano Gomez, Greg Frick, Todd Schultz, Tom Monfre
Would you like to add new technologies to your existing environment to give you a better solution at a reduced cost? Participate in this discussion and learn how other users have leveraged or are planning to leverage cloud technologies and the web client. This session is hosted by the Microsoft Dynamics GP User Group.
A316Thursday March 6, 2014

5:00 PM - 6:00 PM

A bit more about my sessions...

CSGP014 IS NOT a rehash of my past Customization sessions. This time I will be covering some real cool Microsoft Dynamics GP 2013 customization techniques that I feel all beginners should take advantage of - and why not, even developers who have had a couple years of experience with the customization tools, so I would say if you are a beginner or intermediate level person, this session is for you.

For CSGP008, I'm picking up where my good friend Kelly Youells left off - as you can tell, I have some pretty big shoes to fill. My session, nonetheless, will cover some of the traditional upgrade considerations along with the new cool stuff for Microsoft Dynamics GP 2013, like web client, for example.

Finally, I will be driving an interactive discussion with some very cool individuals, one of whom happens to be a direct customer of ours here at IntellPartners. All my panelists will be talking about their experiences with Microsoft Dynamics GP in the cloud and, of course, web client. You won't want to miss this interactive!

Please like this post on Facebook or Twitter or simply drop me a quick comment to let me know which session you are planning to attend.

Until next post!

MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/

Tuesday, January 14, 2014

GPUG Integration Showcase Series



Well, it's been a hectic beginning of the year for me and projects keep rolling in, keeping me away from writing. However, there are other ways you can get in touch with The Dynamics GP Blogster. One of them is by joining me at the new GPUG Education Hub's Integration Showcase Series. This series of online seminars will begin on January 20th and will end with an online interactive roundtable discussion where you will have a chance to ask all the presenters about the kind of stuff that keeps you up at night when it comes to integrating your corporate applications.

The series will feature different integration middleware products, integration techniques, and presenters from eOne Business Solutions, Scribe, Zap, and of course, moi! I will be talking about Integration Manager for Microsoft Dynamics GP and how you can leverage it to build powerful, yet easy to use integrations. Of course, I will talk about the tools strengths and limitations.


DateTimeProductTitle/Topic
January 202:00 PM ESTConnectorDynamics Integration using Connector for Microsoft Dynamics
January 211:00 PM ESTScribeDynamic GP Integration with CRM and SFDC
January 283:00 PM ESTT-SQLIntegrating with Microsoft Dynamics GP Using SQL Code
January 293:00 PM ESTeConnectDo it MY Way! Custom Integration with eConnect
January 301:00 PM ESTIntegration ManagerIntegration Manager Please!
February 41:00 PM ESTZAP Integration ToolLeveraging the power of eConnect with Zap! Integration
February 43:00 PM ESTWeb ServicesWeb Services Unlocks and Extends the Power of Dynamics GP
February 51:00 PM ESTSmartConnectWho Needs a Developer? Create GP Integrations on your own!
February 53:00 PM ESTIntegration Series Roundtable

This series promises to be really exciting and I hope you can join the presentations and the closing roundtable discussion featuring all presenters.

If you are not a GPUG member, please click here to register and don't miss out.

Until next post!

MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/

Monday, January 6, 2014

First reason to attend Microsoft Dynamics Convergence 2014: Fun.



While Microsoft Dynamics Convergence can be fun - in fact, it's a lot of darn fun! - this time around I am referring to American indie pop band FUN. - yes, it's stylized as fun with the period at the end, so you could say "fun, period!", just making stuff up as I go along. Fun. will be performing at the Convergence Celebration event on Thursday, March 6, 2014

From left to right: Andrew Dost (Guitar), Nate Ruess (Sampler), Jack Antonoff (Guitar)
Fun., based in New York City, was formed by Nate Ruess, formerly of The Format. After the breakup of The Format, Ruess formed Fun with Andrew Dost and Jack Antonoff, of Anathallo and Steel Train, respectively. Fun has released two albums: Aim and Ignite in August 2009 and Some Nights in February 2012.

The band is best known for three hit singles: Grammy Award-winning "We Are Young" (featuring Janelle Monáe), "Some Nights", and "Carry On". "We Are Young" reached number one on the U.S. Billboard Hot 100 and Digital Songs charts. It also peaked at number one in the United Kingdom. "Some Nights" was released as the album's second single in June 2012, peaking at number three on the Hot 100 chart and becoming Fun's second Top 10 single, as well as the band's second song to reach platinum status in the United States.

On February 10, 2013, Fun won the Grammy Award for Best New Artist and won the Grammy Award for Song of the Year for "We Are Young". Additionally, Fun was a nominee for four other Grammy Awards: Record of the Year and Best Pop Duo or Group Performance (both for "We Are Young") along with Album of the Year and Best Pop Vocal Album (both for Some Nights).

With that said, here is the video of the Song of the Year, "We are Young".


Don't forget to register for Microsoft Dynamics Convergence 2014 in Atlanta.

Until next post!

MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/

Thursday, January 2, 2014

Happy New Year!



Hope you had a great time with family and friends and that you were able to stave off some of the culinary temptations that went around your dining table every evening... I know I tried!

What's in store for this year... we have tons of conferences (virtual and on-premise), more articles on Web Client - will continue with the Web Client Wednesday series, I will start to dive more into Windows 8 store apps integration to Microsoft Dynamics GP 2013, then will cover more on the Power BI tools and how these facilitate Microsoft Dynamics GP data analysis, and much more.

So get ready and come along for the ride.

Until next post!

MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/