Thursday, June 24, 2010

Removing max size limit for crm attribute

Just run this sql statement

===========================================
BEGIN TRAN

-- Convert a field to an email body and thus remove the
-- limit check in the platform

UPDATE MetadataSchema.Attribute SET MaxLength = 1073741823,
AttributeLogicalTypeId = 'emailbody' WHERE [name] in ('crmattributeid' )

COMMIT TRAN

==============================================

3 comments:

  1. Warning:
    after this update, you may have to change sql type of an attribute to ntext, coz it still nvarchar
    (MetadataSchema.AttributeTypes table for values)

    ReplyDelete
  2. and you have to alter SQL table to enable nvarchar(max) on your column

    ReplyDelete
  3. Hi Eugene,

    Thanks for your suggestion.

    ReplyDelete