Skip to main content


Showing posts from June, 2014

How to create new (missing) columns for entities in your Data Export Service Azure SQL database

CRM 2013: fn_GetLocalizedLabel in custom CRM SQL Report and LabelTypeCode parameter

Today I tried to migrate a custom CRM 4.0 SQL report to the a CRM 2013 SQL report.
In the report designer I hit the preview button and received the following error:

TITLE: Microsoft SQL Server Report Designer
An error occurred while executing the query.
An insufficient number of arguments were supplied for the procedure or function dbo.fn_GetLocalizedLabel.

OK, this means the SQL function "fn_GetLocalizedLabel" in CRM 4.0 used to have one parameter less than in CRM 2011 or CRM 2013.

After comparing the paramter signatures with the SQL database version I found this definition:

declare @LocalizedLabelnvarchar(255)

select @LocalizedLabel=l.Label
where @ObjectId=l.ObjectId
and @LanguageCode=l.LanguageId
and @ColumnName=l.ObjectColumnName
and @LabelTypeCode=l.Label…