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 :
Service | Customer Service, Contact Center, Fie...
Unanswered

Cannot change maximum length of Virtual Entity Text Field - On Premise 9.0

(0) ShareShare
ReportReport
Posted on by 65

Hi Folks

There is a need to increase maximum length of single line of text field from 160 to 500 in Virtual Entity on D365 CE On Premise v9.0, however, we encounter an error which indicates that it looks for the entitybase where as we know that there is no entity base for Virtual Entity.

Here is the error message:

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral,

PublicKeyToken=31bf3856ad364e35]]: Exception output:: System.Data.SqlClient.SqlException (0x80131904): Cannot find the object "xts_casa_td_transaction_historyBase" because it does not exist or you do not have permissions.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Microsoft.Crm.CrmDbConnection.InternalExecuteWithRetry[TResult](Func`1 ExecuteMethod, IDbCommand command)
   at Microsoft.Crm.CrmDbConnection.<>c__DisplayClass106_0.b__0()
   at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func`1 func)
   at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func`1 func)
   at Microsoft.Crm.Metadata.SqlHelper.ExecuteNonQuery(ISqlExecutionContext context, IDbCommand sqlCommand)
   at Microsoft.Crm.Metadata.AttributeUpdateAction.AlterColumn(MetadataBusinessEntity existingAttributeInfo, String tableName, String tableColumnName)
   at Microsoft.Crm.Metadata.AttributeUpdateAction.DatabaseOperationInternal()
   at Microsoft.Crm.Metadata.EntityAttributeCreateBatchingAction.DatabaseOperation()
   at Microsoft.Crm.Metadata.MetadataHelper.ProcessDatabaseActions(CounterList listCounters)
   at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func`1 func)
   at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func`1 func)
   at Microsoft.Crm.Metadata.MetadataHelper.ProcessDatabaseOperationsInternal(CounterList listCounters)
   at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
   at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
   at Microsoft.Crm.Metadata.MetadataHelper.b__110_0()
   at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
   at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
   at Microsoft.Crm.Metadata.AttributeService.Update(Guid attributeId, AttributeInfo attributeInfo, Boolean mergeLabels, MetadataHelper metadataHelper, ExecutionContext context)
   at Microsoft.Crm.Metadata.AttributeService.Update(Guid attributeId, AttributeInfo attributeInfo, Boolean mergeLabels, ExecutionContext context)
   at Microsoft.Crm.Metadata.AttributeService.Update(Guid attributeId, AttributeInfo attributeInfo, Boolean mergeLabels, Guid solutionId)
   at Microsoft.Crm.Application.WebServices.SystemCustomization.AttributeUpdate.Execute(Guid solutionId, ParameterBag paramBag)
   at Microsoft.Crm.Application.WebServices.SystemCustomization.SystemCustomization.UpdateAttribute(XmlNode data)
ClientConnectionId:32d659c1-3b21-41b4-83d4-1daf300c794a
Error Number:4902,State:1,Class:16
Error(s) details:
Class: 0x10
LineNumber: 1
Message: Cannot find the object "xts_casa_td_transaction_historyBase" because it does not exist or you do not have permissions.
Number: 4902
Procedure:
Server: azr-appcrm-d01
Source: .Net SqlClient Data Provider
State: 1
ToString(): System.Data.SqlClient.SqlError: Cannot find the object "xts_casa_td_transaction_historyBase" because it does not exist or you do not have permissions.
--
: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #65D3ECADDetail:

  0508d6cc-758c-4319-9b6f-a127a8aa35f4
  -2147220970
  
  Exception output:: System.Data.SqlClient.SqlException (0x80131904): Cannot find the object "xts_casa_td_transaction_historyBase" because it does not exist or you do not have permissions.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Microsoft.Crm.CrmDbConnection.InternalExecuteWithRetry[TResult](Func`1 ExecuteMethod, IDbCommand command)
   at Microsoft.Crm.CrmDbConnection.<>c__DisplayClass106_0.b__0()
   at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func`1 func)
   at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func`1 func)
   at Microsoft.Crm.Metadata.SqlHelper.ExecuteNonQuery(ISqlExecutionContext context, IDbCommand sqlCommand)
   at Microsoft.Crm.Metadata.AttributeUpdateAction.AlterColumn(MetadataBusinessEntity existingAttributeInfo, String tableName, String tableColumnName)
   at Microsoft.Crm.Metadata.AttributeUpdateAction.DatabaseOperationInternal()
   at Microsoft.Crm.Metadata.EntityAttributeCreateBatchingAction.DatabaseOperation()
   at Microsoft.Crm.Metadata.MetadataHelper.ProcessDatabaseActions(CounterList listCounters)
   at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func`1 func)
   at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func`1 func)
   at Microsoft.Crm.Metadata.MetadataHelper.ProcessDatabaseOperationsInternal(CounterList listCounters)
   at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
   at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
   at Microsoft.Crm.Metadata.MetadataHelper.b__110_0()
   at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
   at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
   at Microsoft.Crm.Metadata.AttributeService.Update(Guid attributeId, AttributeInfo attributeInfo, Boolean mergeLabels, MetadataHelper metadataHelper, ExecutionContext context)
   at Microsoft.Crm.Metadata.AttributeService.Update(Guid attributeId, AttributeInfo attributeInfo, Boolean mergeLabels, ExecutionContext context)
   at Microsoft.Crm.Metadata.AttributeService.Update(Guid attributeId, AttributeInfo attributeInfo, Boolean mergeLabels, Guid solutionId)
   at Microsoft.Crm.Application.WebServices.SystemCustomization.AttributeUpdate.Execute(Guid solutionId, ParameterBag paramBag)
   at Microsoft.Crm.Application.WebServices.SystemCustomization.SystemCustomization.UpdateAttribute(XmlNode data)
ClientConnectionId:32d659c1-3b21-41b4-83d4-1daf300c794a
Error Number:4902,State:1,Class:16
Error(s) details:
Class: 0x10
LineNumber: 1
Message: Cannot find the object "xts_casa_td_transaction_historyBase" because it does not exist or you do not have permissions.
Number: 4902
Procedure:
Server: azr-appcrm-d01
Source: .Net SqlClient Data Provider
State: 1
ToString(): System.Data.SqlClient.SqlError: Cannot find the object "xts_casa_td_transaction_historyBase" because it does not exist or you do not have permissions.
--
: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #65D3ECAD
  2021-09-06T02:49:25.6704733Z
  false
  
  
  
  





My role is system administrator, so I suppose that it should not be permission issue. Would really appreciate if anyone can share there experience here. Many thanks

Regards,
Jonas

  • Community Member Profile Picture
    on at

    Hi Jonas,

    Have you tried to change with shorter length?

    I have found one thread, which meets same error in single line of text field.

    (+) Error - Changing Maximum Length on Text Field - Microsoft Dynamics CRM Forum Community Forum

    Maybe you can try to create a new field with 500 length, and copy original field's value to the new field.

    or you can open the ticket with Microsoft and ask for support.

    https://admin.powerplatform.microsoft.com/support

  • Jonas Bunawan Profile Picture
    65 on at

    Hi Leah

    Thanks for keeping on responding to my inquiries! I ended up doing some trial and found out that it might be an issue in v9.0 on premise version to change maximum length of text field. The workaround is to:

    - unbind the Virtual Entity to Data Source and remove the Virtual Entity out of the solution, then import that solution onto targeted environment.(yes, somehow we need to remove the Virtual Entity first)

    - After that, delete the field that we would like to change the length for (I figure that since this is Virtual Entity, there is no harm on doing this without backup restore data of that specific column)

    - Recreate the field with desired length

    - Add the VE back onto the solution and reimport the solution to targeted environment.

    Of course this workaround is not so convenient when we already have a lot of effective dependencies to other components, but at least that's one of the ways for now.

    There is no issue if we just change the max length of Virtual Entity field in v9.1, though.


    Regards,
    Jonas

  • Community Member Profile Picture
    on at

    Hi Jonas,

    Glad your problem was solved, and thanks for sharing your solution!

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

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Daniyal Khaleel Profile Picture

Daniyal Khaleel 60 Most Valuable Professional

#2
11manish Profile Picture

11manish 14 Super User 2026 Season 2

#3
Hamza H Profile Picture

Hamza H 8 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans