Entries in DATAFORMTEMPLATECATALOG are not deleted when deleting a Batch Template

When deleting a batch template, entries are deleted from the DATAFORMINSTANCECATALOG table, but they are not deleted from DATAFORMTEMPLATECATALOG table. 
We’re currently evaluating this issue for a fix in a future patch or service pack.

Steps to Duplicate

1. Navigate to Administration>Attribute categories and select Add.
2. Enter a name, choose Revenue as the record type, and choose any data type. Save the new Attribute category.
3. Run the following scripts against the database and note the counts:

select count(*) from DATAFORMINSTANCECATALOG
where FORMNAME like '%batch%'
and description like '%extension%'

select count(*) from DATAFORMTEMPLATECATALOG
where templatename like '%batch%'
and description like '%extension%'

4. Navigate to Administration>Batch>Batch entry and select Batch Templates.
5. Add a new Enhanced Revenue Batch template. Enter a name, choose a workflow name and numbering scheme.
6. On the 'Select fields and defaults' tab, expand Revenue attributes and double-click on the attribute that was added in step 2 to move it over to the selected fields. Save the new template.
7. Run the following scripts against the database again and note the counts. Both should return 3 more than the last time these scripts were run:

select count(*) from DATAFORMINSTANCECATALOG
where FORMNAME like '%batch%'
and description like '%extension%'

select count(*) from DATAFORMTEMPLATECATALOG
where templatename like '%batch%'
and description like '%extension%'

8. On the Batch Templates page, expand the arrow on the newly created template and select delete
to delete the template.
9. Once again run the following scripts against the database again and note the counts. Notice that DATAFORMINSTANCECATALOG has been reduced by 3 to the original number but DATAFORMTEMPLATECATALOG is still at the same count that was returned in step 7:

select count(*) from DATAFORMINSTANCECATALOG
where FORMNAME like '%batch%'
and description like '%extension%'

select count(*) from DATAFORMTEMPLATECATALOG
where templatename like '%batch%'
and description like '%extension%'

Environment

 Blackbaud CRM
 4.0
 4.0.170.0

Was this article helpful?