Retaining the Dynamics NAV 2009 SP1 Outlook Addin settings in a Terminal Server environment

With Dynamics NAV 2009 SP1, the Outlook Synch settings are no longer part of the IsolatedStorage but are now part of the Local Settings of the userprofile. This gives problems when implementing the solution on a Terminal Server. The Local Settings of a user profile do usually not roam. Especially when setting the GPO to delete the locally stored user profile, the settings are even no longer stored locally. The quick and dirty workaround is to implement a logoff and logon script that keeps the Outlook Addin settings up to date.

With Dynamics NAV 2009 SP1 running on Windows 7, the path to the Outlook Addin settings could be something like this:

  %userprofile%\AppData\Local\Microsoft Dynamics NAV\OutlookSynch

This folder may contain the following files after a full synchronization was executed successfully:
EntryIdStorage.xml
LastSynchronizationTime.xml
NavisionSynchronizationEntity.xml
OutlookSynchronizationEntity.xml
Settings.xml
SynchronizationConflict.xml
SynchronizationEntityFilter.xml
SynchronizationError.xml
SynchronizationSchema.xml
SynchronizationSchemaString.xml

These files are unique to every single users. The files itself cannot be modified manually. With a single logoff script, you could easily copy these files from %userprofile%\AppData\Local\Microsoft Dynamics NAV\OutlookSynch to a shared folder on the network. E.g.: \\servername\sharename\OutlookSynch\%username%

An example of such a logon script could look like this:

@echo off
GOTO BEGIN

:BEGIN
if not exist “%userprofile%\Local Settings\Application Data\Microsoft Dynamics NAV\OutlookSynch” GOTO MKDIR
GOTO UPLOAD

:MKDIR
MKDIR “%USERPROFILE%\Local Settings\Application Data\Microsoft Dynamics NAV\OutlookSynch”
GOTO UPLOAD

:UPLOAD
COPY “\\servername\sharename\OutlookSynch\%username%” “%userprofile%\Local Settings\Application Data\Microsoft Dynamics NAV\OutlookSynch\*.*”
GOTO END

:END

An example of such a logoff script could look like this:

Dim sOriginFolder, sDestinationFolder, sFile, oFSO
Set oFSO = CreateObject(“Scripting.FileSystemObject”)
Set objShell = CreateObject(“WScript.Shell”)
strUserProfile = objshell.ExpandEnvironmentStrings(“%userprofile%”)
strUserName= objshell.ExpandEnvironmentStrings(“%username%”)
sOriginFolder = strUserProfile & “\Local Settings\Application Data\Microsoft Dynamics NAV\OutlookSynch”
sDestinationFolder = “\\servername\sharename\OutlookSynch\” & strUserName
For Each sFile In oFSO.GetFolder(sOriginFolder).Files
   oFSO.GetFile(sFile).Copy sDestinationFolder & “\” & oFSO.GetFileName(sFile),True
Next
WScript.Echo “Copying of files succeeded”

There are of course other possibilities to explore here, but the basic idea is that those files are no longer part of the IsolatedStorage and therefore, a system implementer needs to manually ensure that these files roam along with the user profile.

Hope this helps.

Marco Mels

Microsoft Customer Service and Support (CSS) EMEA
These postings are provided “AS IS” with no warranties and confer no rights. You assume all risk for your use.

Table Data Type values (used in Record Links)

Sometime ago I have promised to publish the numbers used in NAV for the data types. These numbers are used all over the system, but are more visible when encoding record links (please refer to my post about encoding record links). This list contains th…

Few tips for NAV developers

I have collected few tips maybe could be used in NAV 2009 developing.Don’t claim me too much if this looks to easy… :)

Files managing on RTC pc.In C/AL we have statements for working with files like: EXISTS(<File_Name>); RENAME(<Old_File_Na…

Few tips for NAV developers

I have collected few tips maybe could be used in NAV 2009 developing.Don’t claim me too much if this looks to easy… :)

Files managing on RTC pc.In C/AL we have statements for working with files like: EXISTS(<File_Name>); RENAME(<Old_File_Na…

Microsoft Dynamics NAV Compatibility with Microsoft Office 2010 and Microsoft SharePoint 2010

With the release of Office 2010 and SharePoint 2010 the relationship between internal line of business applications and business productivity software is stronger than ever. There have been added many exciting new features, which will bring value to ma…

New How Do I Videos for Microsoft Dynamics NAV on MSDN

Announcing the next installment of new videos on MSDN. http://msdn.microsoft.com/bb629407.aspx
These videos target the developer audience for Microsoft Dynamics NAV 2009. The new offerings are:

Multiple Web Service Instances in NAV 2009
Delegation wi…

Compatibility Update with Microsoft SQL Server 2008 R2 and Microsoft Visual Studio 2010

A couple of big Microsoft products shipped recently, so time for an NAV compatibility update.
Microsoft SQL Server 2008 R2
We are proud to announce that both Microsoft Dynamics NAV 5.0 SP1 Update 2 and Microsoft Dynamics NAV 2009 SP1 are compatible wit…

Hotfix released for “Full Screen” mode with the RoleTailored Client

Two new command line parameters have been introduced for the RoleTailored client of Microsoft Dynamics NAV 2009 SP1 as a hotfix (KB 2312984). They enable a number of new usage scenarios for the RoleTailored client.
Samples for those scenarios are: poi…

Multiple Record Corruption on a Native Database: The “Table Isolation” Trick

Due to unexpected events, a multiple record corruption at table level in a Native database may unfortunately happen. The error that may arise is something like this (reported below in Danish) while performing actions on determined records in the corrup…

Segment Wizard for RTC

It is known that in NAV 2009 SP1 there is no Segment Wizard page for RTC.
In this blog you will find some source code in txt format in order to let you start develop the Segment Wizard to your RTC. Please, check the disclaimer on code usage at the bott…