Question Status

Suggested Answer
heguangm asked a question on 12 Jul 2013 9:03 AM

Please go to your org database to see if it has that function. Several functions related to dates are calling that? let me know which Rollup you have.

Reply
Daryl Orwin responded on 12 Jul 2013 9:33 AM

I have it in a dev environment (CRM 2011 RU 13).


/****** Object:  UserDefinedFunction [dbo].[fn_ConvertUtcToSpecificTimeCLR]    Script Date: 7/12/2013 12:29:48 PM ******/

SET ANSI_NULLS OFF

GO

SET QUOTED_IDENTIFIER OFF

GO

CREATE FUNCTION [dbo].[fn_ConvertUtcToSpecificTimeCLR](@UTCTime [datetime], @timeZoneId [nvarchar](60))

RETURNS [datetime] WITH EXECUTE AS CALLER

AS

EXTERNAL NAME [MSCRMSqlClr].[UserDefinedFunctions].[ConvertUtcToSpecificTime]

GO

Reply
heguangm responded on 12 Jul 2013 9:52 AM

from the definition, this function was created an assembly.

Could you please check if you have any assembly besides Microsoft.SqlServer.Types?

appreciate for your quick response,

Reply
Daryl Orwin responded on 12 Jul 2013 10:00 AM
It appears to be part of the .NET Framework (3.5 or above) http://msdn.microsoft.com/en-us/library/bb495915(v=vs.90).aspx
Reply
Daryl Orwin responded on 12 Jul 2013 10:19 AM

Sorry, wrong function.

Not sure where it's pulling that from.  Any suggestions on how to locate it?

Reply
heguangm responded on 12 Jul 2013 10:37 AM

That's a C# class method. It needs to be exposed as a sql function and loaded into SQL. so probably if you check if your db loaded some assembly named [MSCRMSqlClr].

Reply
Mohammad Atif responded on 12 Jul 2013 10:57 AM

I believe you have the same question in two different threads :community.dynamics.com/.../216533.aspx

Thanks,

Mohammad

Reply
heguangm responded on 12 Jul 2013 12:00 PM

go to your org db, then Programmability, then assemblies, check if see any assembly besides Microsoft.SqlServer.Types

Reply
heguangm responded on 12 Jul 2013 12:03 PM

yes, I need to figure out why it is coming from.

From Daryl, seems that function is from an assembly. However I did not see it. Did you see the same function definition as him?

If it is from an assembly, I need to know which dll?

Reply
Suggested Answer
heguangm responded on 15 Jul 2013 10:04 AM

couple of things were missing here: we fixed the problem.

The function is implemented in an assemble: Microsoft.Crm.SqlClr.Helper.dll .

For some reason that assembly is still the RTM version: so it is a bug of the CRM updates - did not get the latest but other updates are fine.

The online crm db copy might have problem too: it did not define the function (or reporting the assembly was not there....)

Thanks,

Reply
Suggested Answer
heguangm responded on 15 Jul 2013 10:04 AM

couple of things were missing here: we fixed the problem.

The function is implemented in an assemble: Microsoft.Crm.SqlClr.Helper.dll .

For some reason that assembly is still the RTM version: so it is a bug of the CRM updates - did not get the latest but other updates are fine.

The online crm db copy might have problem too: it did not define the function (or reporting the assembly was not there....)

Thanks,

Reply