Error: Attribute Form Extensions:Data could not be saved. A .NET Framework error occurred during execution of user-defined routine or aggregate USP_LOADSPEC" - when adding an attribute form extension"

When trying to add an attribute form extension in the attribute categories area the error below occurs:

Data could not be saved.  A .NET Framework error occurred during execution of user-defined routine or aggregate "USP_LOADSPEC":
System.Data.SqlClient.SqlException: A .NET Framework error occurred during execution of user-defined routine or aggregate "USP_DATAFORMINSTANCE_CREATEORUPDATEPROCEDURES":
System.NullReferenceException: Object reference not set to an instance of an object.
System.NullReferenceException:
   at Blackbaud.AppFx.Platform.SqlClr.DataForm.BuildDataFormEditUpdateQuery(SqlConnection conn, FormMetaData formDef, Guid id, String templateSaveProcedure, String templateLoadProcedure, Boolean hasChangeAgent, Boolean hasTSLong, Boolean hasAppUserForLoad, Boolean hasAppUserForSave, Boolean hasID, String contextParamName, List`1 saveParams, String procedureTemplate, String procedureTemplateNoLoad, String procedureTemplateNoLoadNoTSLong, EditDataFormTemplateSpec editTemplateSpec)
   at Blackbaud.AppFx.Platform.SqlClr.DataForm.BuildDataFormEditUpdateQuery(SqlConnection conn, FormMetaData formDef, Guid id, String templateSaveProcedure, String templateLoadProcedure, Boolean hasChangeAgent, Boolean hasTSLong, Boolean hasAppUserForLoad, Boolean hasAppUserForSave, Boolean hasID, String contextParamName, EditDataFormTemplateSpec editTemplateSpec)
   at Blackbaud.AppFx.Platform.SqlClr.DataForm.CreateOrUpdateEditProcedures(SqlConnection conn, Guid formID, ResultRow metadata, EditDataFormTemplateSpec editFormTemplateSpec)
   at Blackbaud.AppFx.Platform.SqlClr.DataForm.CreateOrUpdateProcedures(SqlGuid FormID)
.
System.Data.SqlClient.SqlException:
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlCommand.RunExecuteNonQuerySmi(Boolean sendToPipe)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Blackbaud.AppFx.SqlClr.SpWrap.USP_DATAFORMINSTANCE_CREATEORUPDATE_SP.WrapperRoutines.ExecuteNonQuery(SqlConnection co...
LOADSPEC ERROR:A .NET Framework error occurred during execution of user-defined routine or aggregate "USP_DATAFORMINSTANCE_CREATEORUPDATEPROCEDURES":
System.NullReferenceException: Object reference not set to an instance of an object.
System.NullReferenceException:
   at Blackbaud.AppFx.Platform.SqlClr.DataForm.BuildDataFormEditUpdateQuery(SqlConnection conn, FormMetaData formDef, Guid id, String templateSaveProcedure, String templateLoadProcedure, Boolean hasChangeAgent, Boolean hasTSLong, Boolean hasAppUserForLoad, Boolean hasAppUserForSave, Boolean hasID, String contextParamName, List`1 saveParams, String procedureTemplate, String procedureTemplateNoLoad, String procedureTemplateNoLoadNoTSLong, EditDataFormTemplateSpec editTemplateSpec)
   at Blackbaud.AppFx.Platform.SqlClr.DataForm.BuildDataFormEditUpdateQuery(SqlConnection conn, FormMetaData formDef, Guid id, String templateSaveProcedure, String templateLoadProcedure, Boolean hasChangeAgent, Boolean hasTSLong, Boolean hasAppUserForLoad, Boolean hasAppUserForSave, Boolean hasID, String contextParamName, EditDataFormTemplateSpec editTemplateSpec)
   at Blackbaud.AppFx.Platform.SqlClr.DataForm.CreateOrUpdateEditProcedures(SqlConnection conn, Guid formID, ResultRow metadata, EditDataFormTemplateSpec editFormTemplateSpec)
   at Blackbaud.AppFx.Platform.SqlClr.DataForm.CreateOrUpdateProcedures(SqlGuid FormID)

We are currently evaluating this issue and will update this article when we have more information.

Environment

 4.0.131

Was this article helpful?