Today I resigned from Microsoft. While I’m leaving to take a big step in a new direction, I have to say, it’s with very mixed emotions. Five and a half years ago, I started a journey that changed me forever. Not only was it the realization of a te…
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…
Memory Leaks in Java
One of the beauties of using Java programming language is that the programmers need not worry about the memory allocation and freeing of objects. We simply declare and initialize objects and JVM(Java Virtual Machine) will take care of freeing them when they are no longer in use by any application through a mechanism called ‘garbage collection’. Before we start our topic, let us check how the memory is allocated for the objects.
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…
Which Programming Language is the Most Secure?
This is a question that can cause a thousand debates on the internet so before we get started we should make one thing clear. If the programming language is in the hands of a seasoned professional, then any one of these languages can be secured. Most of the security problems that come from certain languages are the fault of the programmer and not the actual language itself.