July 2009 - NAV Developers Blog

  • Index Usage Information Tool

    Attached at the end of this post is a set of NAV objects that collects index usage information, and displays it in a NAV client so that you can sort tables by no. of Indexes / Index Reads / (Index) Block wait time, etc.: The tool is using these three SQL Queries / DMVs: sys.indexes: Basic information about indexes sys.dm_db_index_usage_stats: No. of Index Reads, updates, etc sys.dm_db_index_operational_stats...
    Filed under:
  • Converting company names for NAV Web Services

    A few weeks ago I saw an up tick in the number of cases having problems accessing exposed web service. Some of the problem has been because the “CRONUS USA, Inc.” company name converts to an unfamiliar “CROUNS_USA_x002C__Inc”. This will be changing in NAV 2009 SP1 , but until that time it would be helpful to know exactly how company names are converted for NAV Web Services. The rules are: The character...
  • How to set dynamically the Key and Sort Order for the pages using NAV 2009 Web Services feature.

    The default methods exposed when a page is published are the so-called CRUD (Create, Read, Multiple and Delete) methods. All of those does not allow to set up previously a key for sorting order nor if the records have to be ascending or descending. In order to retrieve data in a particular sorting order it should be necessary to develop N pages for N related sorting keys. This can be a solution that...
  • How to read a SQL Profiler trace file into a SQL table

    Just a small tip that I use often when I have a large SQL Profiler trace. Rather than reading through trace files line by line, you can read it into a table and then query it. This syntax creates a new table in SQL Server and loads your trace file into it: SELECT * INTO MyTraceTemp FROM :: fn_trace_gettable ( 'c:\x\MyTrace.trc' , default ) The default parameter means that if the trace is across...
    Filed under:
  • Strange errors come during change SourceExpr value in NAV report designer...

    Our colleague raised problem: why he receives strange error during report compile, after he changed SourceExpr value for some control in report designer in NAV 2009. Error message was: Error while validating RDL content: The Value expression for textbox “CompanyInfo” refers to the field ‘PricesInclVAT_YesNo’. Report Item expressions can only refers to fields within the current data set scope or, if...
  • Where is the zup file again?

    I keep forgetting where the CustomSettings.config, ClientUserSettings.Config etc files are. So I keep looking it up again in "Where is the zup file" . This time, I collected the location of these files in a NAV form so I don't have to look them up anymore. In addition to this you can edit the files from the form directly. It looks like this: The first time you run the form it will insert...
    Filed under: