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: function [ dbo ].[ fn_GetLocalizedLabel ] (     @ ObjectId uniqueidentifier ,     @ ColumnName nvarchar ( 255 ),     @ LabelTypeCode int ,     @ LanguageCode int ) returns nvarchar ( 255 ) as begin     declare @ LocalizedLabel      nvarchar ( 255 )         begin         select @ LocalizedLabel = l . Label             from LocalizedLabelView l