The issues is that when I try to create a phone call activity, I get the following error (String length too Long).
Contact name length is 101.
*This post is locked for comments
Hi,
Thanks for the kind words. Since this error is occurring trying to set a system/hidden field, I'm not sure there's anything you can do to absolutely prevent it from happening, but you shouldn't see it in practice for a few reasons:
- The contact firstname and lastname fields are both 50 characters, so if they're maxed out the total length can be 101 or 102 depending on formatting. Since you won't have a contact with that kind of name, this won't be a problem.
- I believe all other system entities have a primary field length of 100, so they should be fine
- Custom entities have a default length of 100, so unless you change that, they cant cause the error.
Taken all together, you almost certainly won't see this problem in a production environment.
Thanks,
Aiden
thanks for quick and kind response but what if i am performing same action using source code. it will through an exception how will i handle this in source code ?
Its a little odd but I'm not surprised. It's not saying the contact name is too long for the contact, it's saying your regarding entity name is too long for the activity. It's going to set the activity name to the primary field value of the regarding entity, but this could be a problem on a lot of places. When you create a custom entity you can make the name field as long as you want it's not gong to manifest just as an issue with contacts.
you are right but don't you find this thing weird . i mean in contact , Dynamics CRM is allowing to save a name with long characters but in phone call activity it is saying to same contact that it is too long. why would dynamics CRM allows this in contact ?
That error is occurring because the contact in the Regarding field has a name that is too long. If you changed that contact's name to a realistic name then everything should save just fine. If this helps, I would really appreciate if you would mark this as the verified answer.
Thanks!
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
HR-09070029-0 2
Aric Levin - MVP 2 Moderator
ED-30091530-0 1