web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

CRM Solution Import Error: Index size exceeded the size limit of 900 bytes. The key is too large. Try removing some columns or making the strings in string columns shorter.

(0) ShareShare
ReportReport
Posted on by 193

Hi guys,

First I update the maximum length of a textbox field from 4000 to 3.

Then I created a new key for that specific field.

Initially, since it is a new key, I was able to import my solution successfully. But for some reason when I redeploy (meaning the key is already existing), I am having this error "Index size exceeded the size limit of 900 bytes. The key is too large. Try removing some columns or making the strings in string columns shorter." As a workaround I can just delete the key first in the 'target' environment then redeploy and its working for me. But this is not ideal as it would cause issues in some way or another.

Can you please provide your thoughts why this happening?

*This post is locked for comments

I have the same question (0)
  • Dynamics365 Rocker Profile Picture
    7,755 on at

    Is your solution managed or unmanaged?

  • JZot Profile Picture
    193 on at

    Hi,

    It is unmanaged.

  • Suggested answer
    Dynamics365 Rocker Profile Picture
    7,755 on at

    Please reduce size field. You will get more details at below link:

    community.dynamics.com/.../207912

  • JZot Profile Picture
    193 on at

    What do you mean size field? My field's maximum length is only set to 3.

  • Dynamics365 Rocker Profile Picture
    7,755 on at

    First I update the maximum length of a textbox field from 4000 to 3.

    Then I created a new key for that specific field.

    Please elaborate what specific field you have created.

  • Suggested answer
    tpeschat Profile Picture
    4,930 on at

    Is your field a find column in the quick find view?

    If yes, that's the reason. Because for find columns automatically an index is being created and there are limitations reg. the max. number of characters.

    This is a limitation on sql side.

    docs.microsoft.com/.../maximum-capacity-specifications-for-sql-server

    And since you mentioned you changed it from 4000 to 3, I assume this is a multiple lines of text field. That field will always consume 4000 characters in the db, although you set it to 3 characters (which only does validation that no more than 3 characters can be entered).

    Hth Thomas

  • JZot Profile Picture
    193 on at

    Hi Thomas,

    Thanks for your reply.

    No the field mentioned above was not part of the find column of the quick find view. I just created a key for it. 

    Let me know if you have any other thoughts on this.

    Thank you again for your help.

  • Suggested answer
    tpeschat Profile Picture
    4,930 on at

    Hi.

    Same restriction (max. length of characters in an index) applies for alternate keys:

    docs.microsoft.com/.../define-alternate-keys-entity

    Alternative keys are supported for following field types:

    - decimal

    - whole number

    - single line of text

    I just wonder, since you wrote you changed the length of this field from 4000 to 3, if this is really a single line of text field?

    Is this a custom field, created by you, or a default field?

    Because I also experienced the fact, that some of the default fields, that exist since the earliest CRM version (e.g. Address fields) does not change from 4000 characters on database level, even though you reduce the number of characters.

    Hth Thomas

  • JZot Profile Picture
    193 on at

    Hi Thomas,

    Thanks for reply again!

    Yes you are correct. It is a custom single text field in a custom entity. Initially it was set to 4000 for some reason and I changed it to 3 then created a new key.

    When I imported it initially in target environment it was successfully imported. But when I tried to reimport again (key already existing), the import error occured.

    Do you know how can I fix this? Thanks!

  • Community Member Profile Picture
    on at

    Hello JZ,

    Did you ever solve this?

    We have a deployment process that allows me to only publish managed solutions in our live environment.

    When I first imported the solution update patch which included this key, the solution was published successfully.

    Now I'm trying to publish a big update (cloning the solution) and I can't get past this issue exactly because of this alternate key I introduced earlier.

    I've tried:

    1. Reducing the field size from 450 characters to 200 characters on DEV and then import to Live.

    2. Removing the key altogether from DEV and then import to Live.

    3. Reducing the field size on Live (yes I had to override our internal process) and then import from DEV.

    4. Deleting the key altogether from Live (wasn't allowed as I'm getting an error stating that the component is managed which is expected).

    I can't easily uninstall from Live the patch that introduced the key in the first place as it also included some new fields and processes that will lead to data loss.

    Any ideas of how to get past this?

    Many thanks,

    Panos

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans