Error: Field 'BATCHROWID' is an editable field but it is not defined as a parameter on the procedure. when running SP7 revisions

When upgrading to Service Pack 7 users may receive the following revision error. 
Download and install the latest patch which contains all fixes from previous patches. If you are running an older version, download and install the latest version and then the patch. 
 

Steps to Duplicate

1. Upgrade to Service Pack 7 and run revisions
2. Receive Database revision error below: 

"2016-04-22 01:56:08","Information","Running revision number 1520 for the Blackbaud.AppFx.Galileo.ServiceRevisions assembly."
"2016-04-22 01:56:08","Information","Running revision ... RevisionID: 520 (1 of 29) for revision set 1520"
"2016-04-22 01:56:08","Information","Loading xml catalog item: 520.ConstituentUpdate.Batch.xml"
"2016-04-22 01:56:11","Error","The "RunServiceRevisions" task failed unexpectedly.
Blackbaud.AppFx.Platform.BuildTasks.RunServiceRevisionsHelpers.RevisionExecutionException: An error occurred while executing a service revision. Procedure Return Code: 0
Revision text: LoadSpec: 520.ConstituentUpdate.Batch.xml Blackbaud.AppFx.Galileo.ServiceRevisions.Specs1520.zip ---> Blackbaud.AppFx.Platform.BuildTasks.RunServiceRevisionsHelpers.LoadSpecException: Procedure Return Code: 0 ---> System.Exception: Field 'BATCHROWID' is an editable field but it is not defined as a parameter on the procedure. ---> System.Data.SqlClient.SqlException: A .NET Framework error occurred during execution of user-defined routine or aggregate "USP_LOADSPEC_AS_STRING": 
System.Exception: Field 'BATCHROWID' is an editable field but it is not defined as a parameter on the procedure.
System.Exception: 
   at Blackbaud.AppFx.Platform.SqlClr.DataFormSpecProcessor.ValidateFormDefAgainstSaveSP(FormMetaData formDef, String sp, String baseTable, ExpectedDBExceptions expectedExceptions, DataFormModes mode, Boolean hasID, String contextParamName, String createProcedureSQL)
   at Blackbaud.AppFx.Platform.SqlClr.DataFormSpecProcessor.ProcessSPAddSpec(AddDataFormTemplateSpec addSpec, Nullable`1 changeAgentID, SqlBoolean processPageAlterations)
   at Blackbaud.AppFx.Platform.SqlClr.DataFormSpecProcessor.ProcessAddSpec(AddDataFormTemplateSpec spec, Nullable`1 changeAgentID, SqlBoolean processPageAlterations)
   at Blackbaud.AppFx.Platform.SqlClr.BatchTemplateProcessor.ProcessAddDataFormTemplate(AddDataFormTemplateSpec addSpec, Nullable`1 changeAgentID)
   at Blackbaud.AppFx.Platform.SqlClr.BatchTemplateProcessor.BuildBatchCommitAddDataForm(Guid batchTypeID, Guid batchTemplateID, String batchTypeName, Guid commitAddRowDataFormTemplateId, String procName, Nullable`1 dataFormID, FormMetaData batchTemplateFormMetaData, Dictionary`2 batchExtensions, Nullable`1 changeAgentId)
   at Blackbaud.AppFx.Platform.SqlClr.BatchTemplateProcessor.CreateOrUpdateDataFormSPs(Guid batchTypeID, Guid batchTemplateID, String batchTypeName, Guid addRowDataFormTemplateId, Nullable`1 addDataFormID, Guid editRowDataFormTemplateId, Nullable`1 editDataFormID, Guid commitAddRowDataFormTemplateId, Nullable`1 commitAddDataFormID, Guid commitEditRowDataFormTemplateId, Nullable`1 commitEditDataFormID, FormMetaData batchTemplateMetaData, Dictionary`2 batchExtensions, Nullable`1 changeAgentId, String commitEditFormField, BatchTypeSpec batchTypeSpec)
   at Blackbaud.AppFx.Platform.SqlClr.BatchTemplateProcessor.ProcessTemplate(Nullable`1& batchTemplateID, Nullable`1 batchTypeCatalogID, String name, String des...
LOADSPEC FORMSPEC WARNING: Catalog Item ID: b362894d-e10d-48f5-84cc-f24e2f5fd386: The value for Name exceeds the maximum length of 60 and will be truncated.
LOADSPEC FORMSPEC WARNING: Catalog Item ID: ff71427c-ad54-442b-ab32-39ec177c12cb: The value for Name exceeds the maximum length of 60 and will be truncated.
LOADSPEC FORMSPEC WARNING: Catalog Item ID: e4ade167-810d-4e1e-9acf-de5a65ca71c5: The value for Name exceeds the maximum length of 60 and will be truncated.
LOADSPEC ERROR:Field 'BATCHROWID' is an editable field but it is not defined as a parameter on the procedure.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.SqlInternalConnection.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.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Blackbaud.AppFx.Platform.BuildTasks.RunServiceRevisionsHelpers.RevisionRunner.ExecuteLoadSpecAndTrapSpecialError(SqlCommand cmd)
   --- End of inner exception stack trace ---
   at Blackbaud.AppFx.Platform.BuildTasks.RunServiceRevisionsHelpers.RevisionRunner.ExecuteLoadSpecAndTrapSpecialError(SqlCommand cmd)
   at Blackbaud.AppFx.Platform.BuildTasks.RunServiceRevisionsHelpers.RevisionRunner.ExecuteLoadSpecProcedure(SqlConnection conn, String specXML, String assemblyName, String specResourceName, Boolean loadAsDependency, Boolean forceReload, Guid changeAgentID, Boolean skipValiation, String itemType, LoadSpecLogger logger, Boolean compareToExistingSpecXml)
   --- End of inner exception stack trace ---
   at Blackbaud.AppFx.Platform.BuildTasks.RunServiceRevisionsHelpers.RevisionRunner.ExecuteLoadSpecProcedure(SqlConnection conn, String specXML, String assemblyName, String specResourceName, Boolean loadAsDependency, Boolean forceReload, Guid changeAgentID, Boolean skipValiation, String itemType, LoadSpecLogger logger, Boolean compareToExistingSpecXml)
   at Blackbaud.AppFx.Platform.BuildTasks.RunServiceRevisionsHelpers.RevisionRunner.ExecuteLoadSpecProcedure(SqlConnection conn, String specXML, String assemblyName, String specResourceName, Boolean loadAsDependency, Boolean forceReload, Guid changeAgentID, Boolean skipValiation, String itemType, LoadSpecLogger logger, Int32 revisionId, Boolean compareToExistingSpecXml)
   at Blackbaud.AppFx.Platform.BuildTasks.RunServiceRevisionsHelpers.RevisionRunner.LoadSpecInternal(SqlConnection conn, DBRevision r, String assemblyName, String specResourceName, Boolean onlyLoadNonDesignerSpecs, Boolean loadAsDependency, Boolean forceReload, SpecResource specResource, Int32 revisionSetNumber, Int32 revisionID, Boolean compareToExistingSpecXml)
   at Blackbaud.AppFx.Platform.BuildTasks.RunServiceRevisionsHelpers.RevisionRunner.RunRevs(DBRevisions revs, Int32 startAtRevisionID, Boolean onlyLoadNonDesignerSpecs)
   --- End of inner exception stack trace ---
   at Blackbaud.AppFx.Platform.BuildTasks.RunServiceRevisionsHelpers.RevisionRunner.RunRevs(DBRevisions revs, Int32 startAtRevisionID, Boolean onlyLoadNonDesignerSpecs)
   at Blackbaud.AppFx.Platform.BuildTasks.RunServiceRevisionsHelpers.RevisionRunner.RunLatestRevisions()
   at Blackbaud.AppFx.Platform.BuildTasks.RunServiceRevisions.Execute()
   at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult)"
"2016-04-22 01:56:11","Information","Target "RunServiceRevisions" failed."
 

Environment

 Blackbaud CRM
 4.0
 4.0
 Service Pack 9
 4.0.158.0

Was this article helpful?