Error deleting a field in CRM 2011
-
Monday, September 05, 2011 10:59 PM
Hi Guys,
I am getting an error throuwn while trying to delete a field in CRM 2011 and cant seem to find any information regarding it. Log file below:
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: System.Web.HttpUnhandledException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #C3B7E994Detail:
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>System.Web.HttpUnhandledException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #C3B7E994</Message>
<Timestamp>2011-09-05T22:25:09.5339277Z</Timestamp>
<InnerFault>
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d3p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>Failed to insert audit record</Message>
<Timestamp>2011-09-05T22:25:09.5339277Z</Timestamp>
<InnerFault>
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d4p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>System.Data.SqlClient.SqlException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #9ED44428</Message>
<Timestamp>2011-09-05T22:25:09.5339277Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText i:nil="true" />
</InnerFault>
<TraceText i:nil="true" />
</InnerFault>
<TraceText i:nil="true" />
</OrganizationServiceFault>The entity and field do not have Auditing enabled. Your thoughts?
Regards,
Mike.
All Replies
-
Tuesday, September 06, 2011 1:37 AMAny plug-in attached to the entity?
Best Regard Vincent L -
Tuesday, September 06, 2011 3:17 AM
Hi Mike,
The message is saying problem with inserting Auditing record. But you are saying Auditing is not enabled on the entity or the field. Could you please try publishing all the customizations once and then try to delete that field.
Thanks and Regards
Ramu
-
Tuesday, September 06, 2011 5:13 AM
Hi Vincent,
There are no plugins associated with the entity.
Regards,
Mike.
-
Tuesday, September 06, 2011 5:15 AM
Hi Ramu,
I have published all customisations within this default solution, still cannot delete.
Regards,
Mike.
-
Tuesday, September 06, 2011 6:03 AM
Mike,
Can you run the CRM Platform trace and get the error message and post it up and see if we can help?
Best Regard Vincent L -
Tuesday, September 06, 2011 6:05 AM
Hi,
Try disable the Audit Settings and then delete the attribute, you can disable Auditing from System Settings (Settings->Administration->System Settings->Auditing)
Jehanzeb Javeed
http://worldofdynamics.blogspot.com
Linked-In Profile |CodePlex Profile
If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". -
Wednesday, September 07, 2011 5:01 PM
Hi,
Was a resolution reached? We're getting the same error - we don't have auditing enabled on the entity.
Thanks,
Karen Stark
Karen Stark -
Wednesday, September 07, 2011 10:29 PM
Mike,
Can you run the CRM Platform trace and get the error message and post it up and see if we can help?
Best Regard Vincent L
Hi Vincent,Here is the error, I have more if needed.
[2011-09-08 06:24:52.754] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread: 4 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Error | ExceptionConverter.ConvertMessageAndErrorCode
>System.Data.SqlClient.SqlException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #395F0F03: System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'AuditBase'.
> at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
> at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
> at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
> at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
> at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
> at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
> at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
> at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
> at Microsoft.Crm.CrmDbConnection.InternalExecuteWithRetry[TResult](Func`1 ExecuteMethod, IDbCommand command)
> at Microsoft.Crm.CrmDbConnection.InternalExecuteNonQuery(IDbCommand command, Boolean capturePerfTrace)
> at Microsoft.Crm.CrmDbConnection.ExecuteNonQuery(IDbCommand command, Boolean impersonate, Boolean capturePerfTrace)
> at Microsoft.Crm.AuditLib.LogIntoDatabase(Int32 auditOperation, Int32 auditAction, Int32 objectTypeCode, Guid objectId, String attributeMask, String changeData, IPluginExecutionContext context) -
Thursday, September 08, 2011 7:06 AMModerator
Can you check in database if this table is existing? It should exist
My blog : http://mscrmtools.blogspot.com
All my tools for Dynamics CRM 4.0 on my dedicated site: MSCRMTools Repository
Upgraded tools for Dynamics CRM 2011!
View Layout Replicator for Microsoft Dynamics CRM 2011
Searchable Property Updater for Microsoft Dynamics CRM 2011
Ribbon Browser for Microsoft Dynamics CRM 2011
SiteMap Editor for Microsoft Dynamics CRM 2011
JavaScript Web Resource Manager for Microsoft Dynamics CRM 2011 -
Thursday, September 08, 2011 9:13 PM
Well that is strange, you are correct, the table does not exist.
I have found another CRM2011 database, and copied the script to CREATE dbo.AuditBase and pasted it as a new query on my damaged DB:
USE [Organsiaton_MSCRM] GO /****** Object: Table [dbo].[AuditBase] Script Date: 09/09/2011 10:22:53 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[AuditBase]( [AttributeMask] [nvarchar](max) NULL, [TransactionId] [uniqueidentifier] NOT NULL, [Action] [int] NULL, [ObjectId] [uniqueidentifier] NOT NULL, [ObjectIdName] [nvarchar](1) NULL, [UserId] [uniqueidentifier] NOT NULL, [ChangeData] [nvarchar](max) NULL, [CreatedOn] [datetime] NOT NULL, [Operation] [int] NOT NULL, [AuditId] [uniqueidentifier] NOT NULL, [CallingUserId] [uniqueidentifier] NULL, [ObjectTypeCode] [int] NULL ) GO ALTER TABLE [dbo].[AuditBase] ADD DEFAULT (newsequentialid()) FOR [AuditId] GO
That worked perfectly, can now delete the fields as requred.
- Edited by Enprise_Mike Thursday, September 08, 2011 10:26 PM solution
- Marked As Answer by Enprise_Mike Thursday, September 08, 2011 10:26 PM