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 :
Customer experience | Sales, Customer Insights,...
Unanswered

System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: String or binary data would be truncated in table '{0}', column '{1}'. Truncated value: {2}. (Fault Detail is equal to Exception details: ErrorCode: 0 {2}

(0) ShareShare
ReportReport
Posted on by 5

In production environment,customer is using Microsoft Dynamics 365 2020 release wave 2 enabled, version 1710(9.1.0.23466) online..They're getting below exception when inserting a record in an entity that is created from our .net code.We're using IOrganizationservice.create(entity) to insert a record.DCRM does client side validation and gives a validation error when we try to insert data that is longer than that of field length.Can anyone help to find out the cause of this exception?

System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: String or binary data would be truncated in table '{0}', column '{1}'. Truncated value: {2}. (Fault Detail is equal to Exception details:
ErrorCode: 0x80090429
Message: String or binary data would be truncated in table '{0}', column '{1}'. Truncated value: {2}.

  • Luis Nogueira Profile Picture
    Microsoft Employee on at

    Hi,

    From the error message it really seems you are sending a request with some field that exceeds the schema field length.

    My advice is to take a look at the code to make sure all field passed are within the schema length.

    If you want you may paste it here so we can take a look at it.

  • prathyushamagam Profile Picture
    5 on at

    If I try to pass the request with longer field length,I get the following exception as DCRM does the validation,but not the exception customer is facing in their environment."Message: A validation error occurred.  The length of the 'tibco_data' attribute of the 'tibco_unpublisheddata' entity exceeded the maximum allowed length of '100'."I don't have access to code as of now.

  • Anks27 Profile Picture
    1,087 on at

    Hello,

    From the exception details, it is apparent that length of one of the fields exceeds the maximum length specified in Dynamics 365 CRM while creating a record.

    To fix this issue, make sure that length of all fields that you are populating in your code is within the max length limit.

    Signed, Sealed and Delivered.

    Don't forget to help the community by Verifying the answer and Like it if your question has been answered. It will let others know that the topic has verified answer.

     

    Thanks & Regards,

    Ankit Shah(MCT-Microsoft Certified Trainer)

     

    Follow/Connect 101 on below

    LinkedIn:-   https://linkedin.com/in/dynamicpower101/

    Twitter:-     https://twitter.com/Dynamicpower101

    Facebook:- https://facebook.com/DynamicPower101/

    Telegram:- https://t.me/dynamicpower101

    Medium:-   https://medium.com/dynamicpower101

  • prathyushamagam Profile Picture
    5 on at

    Hi

    After setting the field length to max values in DCRM also,customer is still facing the same exception.Except for a filed,we're not setting field length restrictions in code.

    Code follows:

    public String StoreUnpublishedData(String entityName,String messageName,String data,String listener,String failedInfo)

           {

               try

               {

                   String failedInfo2 = String.IsNullOrWhiteSpace(failedInfo) ? "" : failedInfo;

                   if (failedInfo2.Length > 4000)//in case it is too long

                       failedInfo2 = failedInfo2.Substring(0, 4000);

                   Entity LogEntity = new Entity();

                   LogEntity.LogicalName = "unpublisheddata";

                   LogEntity.Attributes.Add("id",Guid.NewGuid().ToString().Replace("-", ""));

                   LogEntity.Attributes.Add("messageName",messageName);

                   LogEntity.Attributes.Add("entityname",entityName);

                   LogEntity.Attributes.Add("Listener", listener);

                   LogEntity.Attributes.Add("Retries", 0);

                   LogEntity.Attributes.Add("failedInfo",failedInfo2);

                   LogEntity.Attributes.Add("data", data);

                   m_ctx.OrganizationService.Create(LogEntity);

                   return newId;

               }

               catch (Exception)

               {

                   throw;

               }

           }

    line m_ctx.OrganizationService.Create(LogEntity) is throwing exception.

    Fields length in DCRM:

    Column Name	           Max Length
    entityname	           100
    messagename	   100
    id	                           100
    failed_info	            4000
    data	                    102400
    listener	            10240
  • ordaxtryin Profile Picture
    35 on at

    Did you ever resolve this issue? We are facing the exact same problem but as part of Dual Write between F&O and CE, sending from F&O to CE.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
11manish Profile Picture

11manish 89 Super User 2026 Season 2

#2
Travis South Profile Picture

Travis South 71

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 52 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans