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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

CRM 4.0 Truncating field

(0) ShareShare
ReportReport
Posted on by 90

We're using the CRM Email router to collect mail and process these in workflows in CRM. Basically, when a new e-mail is received, a workflow is started, the contents of the e-mail is analyzed, and other workflows are called based on the content of the e-mail message. This should all be basic stuff...

The problem is the workflow that converts an e-mail to a ticket. This creates the actual ticket objects, and copies contents from the e-mail object into the ticket object. Specifically, the problem is the "Description" field in the ticket object. This simply is a copy of {Description(E-Mail)} (the body of the message). Unfortunately, a number of the emails now coming in have a body that is too big to fit in the Description field of the Ticket object, and that causes the workflow to fail with a "exceeds lenght limit" error message.

So, is there any easy way to truncate this, either as an edit to the email object or while in the process of copying from the email object to the ticket object? We don't really care if we lose some of the data in the process; we have other means of reviewing this if need be. I just want to get the ticket created automatically.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Lance Squires Profile Picture
    Microsoft Employee on at

    Hi Lars,

     

    By default, the description fields are set to 2,000 characters. You can increase this value, but please keep in mind this can have negative performance impact within SQL. Therefore, I would suggest that you examine the process and capabilities of your SQL deployment prior to making this change. That being said, there is not a way to change this within the UI in CRM 4.0. To make this change, you will need to export the customizations of the entity in question and then modify the MaxLength tag in the cutomizations.xml file for the "description" field or whatever the name is of the field in question on the “Ticket” entity. I have provided an example below on how to do this with the Case entity as I do not know your customizations and naming conventions used:

     

    1. Go to IE, navigate to the CRM 4.0 URL.

    2. Click on Settings > Customization > Export Customizations

    3. Click on the check box next to Case

    4. Click on Export Selected Customizations

    5. Download the file to a location you can easily find.

    6. Extract the files from the folder.

    7. Open the customizations.xml file in Notepad++ or some other xml editing program.

    8. In the document, hold the control + F key to perform a find. In the find, search for the value of "2000". Depending on your customizations, there may be more than one of these fields with 2,000 characters so please be mindful of the PhysicalName in the attribute tag you are modifying prior to making the change in the .xml.

     

    Below is an example from the Case entity within customizations.xml file:

     

    <attribute PhysicalName="Description">
    <Type>ntext</Type>
    <ValidForCreateApi>1</ValidForCreateApi>
    <ValidForUpdateApi>1</ValidForUpdateApi>
    <ValidForReadApi>1</ValidForReadApi>
    <AttributeTypeId>00000000-0000-0000-00aa-11000000001c</AttributeTypeId>
    <DisplayMask>ValidForAdvancedFind|ValidForForm|ValidForGrid</DisplayMask>
    <Descriptions>
    <Description description="Description of the case." languagecode="1033" />
    </Descriptions>
    <ImeMode>auto</ImeMode>
    <RequiredLevel>none</RequiredLevel>
    <Format>textarea</Format>
    <MaxLength>2000</MaxLength>
    <displaynames>
    <displayname description="Description" languagecode="1033" />
    </displaynames>
    </attribute>

     

    9. Modify the value to a desired length. Save the file and then move the customizations.xml file back into the customizations.zip folder to overwrite the existing file in the .zip folder.

    10. Upload the customization back into CRM.

    11. To upload the customization back into CRM, navigate to the CRM 4.0 URL in IE.

    12. Click on Settings > Customization > Import Customizations

    13. Browse for the updated .zip file and click Upload

    14. The updated entity should now show up in the list. Click on it to highlight it and then click on Import Selected Customizations.

    15. After it is imported, click on Customization on the left navigation pane and then click on Customize Entities.

    16. Under More Actions, click on Publish All Customizations to ensure that the newly imported customizations have been published.

     

    This should take care of the issue for you. One thing you may want to do after making the change and publishing the changes is expand the number of rows displayed for the “Description” field in CRM so users do not have to scroll as much in the event there is a large amount of text in the field. To do this, you can perform the following steps. I am using the Case entity again for this example:

     

    1. Go to IE, navigate to the CRM 4.0 URL and click Settings > Customization > Customize Entities

    2. Double-click on the Case entity

    3. Click Forms and Views > Double-click Form (this is the main form) > Double-click on the Description field

    4. In the Field Properties window, click on the Formatting tab. In this tab, there will be a Row Layout section. Choose the number of rows you wish to display.

    5. Click OK

    6. Click Save and Close

    7. In the Entity: Case window, from step 3 where we selected the form, click on Actions > Publish to make the changes publish with CRM.

  • Lars Hansen Profile Picture
    90 on at

    Lance,

    Thank you for that. I don't really want to go that route, as it is a slipperly slope. Add 500 characters now, then add another 500 characters 6 months from now. I'd rather "Strangle" the problem by cutting the data off at the current max limit.

    It is a bit odd, because if you manually enter data, it will truncate it if, at save-time, it exceeds the limit, but it doesn't do that when the data is copied from one object to another.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
AS-17030037-0 Profile Picture

AS-17030037-0 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans