Ever needed a quick and easy way to determine where a specific function is being used? Or a even a specific object? And not wanting to go through the hassle of setting up the Navision Developer's Toolkit (NDT) or IDYN's Object Manager?
Well, consider to use the findfunc line command tool.
Ages ago it seems, when NAV got multilanguage (ML) enabled and a whole bunch of (line command) tools had been created for that. Ages ago that I had been studying and using these. Time runs fast! Having to deal with some ML-enabling issues on a current project I was reminded of these simple and efficient tools, so I searched for them to find them still there in the NAV 2009 Upgrade Toolkit! While playing about with the findfunc tool I had to think of the various forum post where the question was raised how to determine where a specific field in NAV was referred, i.e. how to get "where used" information on the field.
On the command line findfunc should be called with three parameters, i.e.
findfunc text source target
The next table explains the meaning of each parameter:
function or text string in the code that you want to search for; note: findfunc is case sensitive!
source file to be searched in; typically this will be a file containing all (relevant) NAV objects in text format
target file, i.e. the result of the search, containing a list of code strings where text appears, including the object where it occurs
To show the power of findfunc I took an example 'where used' situation, being:
searched for all occurrences of the NAV system function CALCDATE
So findfunc was roughly 5 times faster and not a lot needed to get the tool up and running.
For those that have access to Partner Source you will be able to down load the Upgrade Toolkit from there. For those who haven't could take the Dynamics NAV W1 5.0 Upgrade Toolkit from mibuso. I did not check the binaries, but I assume these tools haven't changed since they were first release by Navision a/s in 2001. So the version is probably not important.
The example test was run on a DELL Latitude E6500/Windows7/4GB RAM/2.80 GHz dual CPU.
Yesterday I wanted to check something on RTC when I got this message:
---------------------------Microsoft Dynamics NAV---------------------------The Microsoft Dynamics NAV Server cannot connect the Change Listener to SQL Server because of the following error: Cannot open database "Demo Database NAV (6-0)" requested by the login. The login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.---------------------------OK ---------------------------
[I pasted the text as uploading a screen shot threw an error.]
I recalled I recently had renamed the w1 Demo Database NAV (6-0) on my SQL Server to Demo Database NAV (6-0) W1 to discriminate it from the other, local databases I had also attached. All because I had migrated my stuff from my old laptop running XP to a new one running Windows 7
Getting the message it struck my mind that I apparently had forgotten to update the CustomSettings.config then. So I browsed to C:\Program Files\Microsoft Dynamics NAV\60\Service, opened CustomSettings.config and searched for the attribute:
<add key="DatabaseName" value="Demo Database NAV (6-0)"/><!-- Name of the Microsoft Dynamics NAV Server instance to connect to (for client) or listen on (for server).-->
... and changed Demo Database NAV (6-0) to Demo Database NAV (6-0) W1, closed the file, selected Save in the dialog and ... wasn't allowed to save it. "What the h...?" But ... end of the day, so I stopped: "Tomorrow another day."
So today I had once again the chance to take advantage of these great forums on (o.a.) dynamicsuser.net and mibuso.com.
I typed in CustomSettings.config and found this post that helped me out. As, on Windows 7 and Windows Server 2008 R2, you cannot save the file directly you have to save a copy in a user directory, change it and then copy it back to the original directory "as administrator".
I thought I already had done that trick, guys, but apparently hadn't, so thank you very much for sharing this information.
Want to learn more about SQL Server 2008 Express? Still think it's just nothing worth at all? Or ...?
Sit down and watch here.
Thanx to Beth Massi.