Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP forum
Answered

Missing Word Templates after Upgrade to 18.6

Posted on by 59
I've seen an issue twice with the most recent upgrade to GP 18.6 where random Word Templates disappear during the upgrade process.
 
After the upgrade, the user reported that they could not print the templates, an exclamation appears in the GP bar at the bottom. Attempting to open the template file from template maintenance does not work, and I notice the file downloaded to the temp folder was quite small. I opened the file with notepad, and it's a blank file.
 
I then tracked down the records in the DYNAMICS database - look in SY20000 for the header record which details the template name and TemplateID. Then look in the syReportTemplates table where RELID equals the TemplateID. This table contains the actual binary data for the Word Template, and the templates in question had a binary value of 0x00 which means an empty file.
 
To resolve, I restored a pre-upgrade backup of DYNAMICS to DYNAMICS_OLD and checked the same records which contained the large string of characters in the BinaryBlob column.
 
Custom templates are typically higher that 10000. Use this query to quickly compare the before and after (note the highlighted rows):
 
SELECT * FROM DYNAMICS_OLD..syReportTemplates WHERE RELID>10000 ORDER BY RELID
SELECT * FROM DYNAMICS..syReportTemplates WHERE RELID>10000 ORDER BY RELID
 
Now that I identified the missing template data, I updated the following script with the specific ID's to recover those files. Change your db names as needed if you use other names for the live, and restored DYNAMICS.
 
UPDATE NEW SET NEW.BinaryBlob=OLD.BinaryBlob
FROM DYNAMICS..syReportTemplates NEW
INNER JOIN DYNAMICS_OLD..syReportTemplates OLD ON NEW.RELID=OLD.RELID
WHERE NEW.RELID IN (10002,10004)
 
This script copies the binary contents from the pre-upgrade Dynamics template table to the upgraded template table.
 
Note the other 0x00 records are legitimately deleted templates from GP, no longer used.
 
Hope this helps someone out there. Not sure why it's happening - we've never seen this with prior upgrades.
 
 
  • Suggested answer
    Terry R Heley Profile Picture
    Terry R Heley Microsoft Employee on at
    Missing Word Templates after Upgrade to 18.6
    Hello!
     
    We have noticed some changes with templates on the 18.6 RTM release that seem to cause our customers some issues and it is similar to what you have noted above.  We were able to recreate this issue and will review in for our next schedule update patch January/February 2024 to make sure this information is not zapped out of the tables again! :-) 
    Your workaround above / script seems to work, also others have taken a backup of their templates and imported it back in and that too does work, but not everyone can find a backup.
     
    There could be several other reasons why templates may not work after an upgrade, and we have them noted of what to check in this area.
     
    Thanks
    Terry Heley
    Microsoft
     
     
  • Verified answer
    Midmichael Profile Picture
    Midmichael 59 on at
    Missing Word Templates after Upgrade to 18.6
    Just marking this as answered since I already resolved, but would be curious if anybody knows why this would happen.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,696 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,490 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans