A customer asked me how long could the Last Name field on a contact be?
an interesting question, even if it wasn’t one I was expecting.
I initially was slightly confused and wondered if the maximum length was words or characters when you are creating a new field. It’s characters if you are wondering.
The limit is 4000 characters, I can’t imagine anyone with a name that long and you would have to pity someone signing their name if it was over 1000 characters let alone 4000.
The answer is 4000 because SQL won’t allow more than 8,000 bytes* in a single row, so clearly a column is also limited by this and CRM always uses unicode (hence the n in nvarchar) so that’s 2 bytes per character. Hope this helps explain things.
*actually 8060 but there’s some overhead of things like row headers and so on.
LikeLike
thanks Adam, I hadn’t thought about the underlying SQL database. It’s always good to have understand the logic behind things
LikeLike
How do you determine the max length for other fields? Wondering in this instance, about the Other Activities field. Thanks!
LikeLike