Issue
The OOTB table for the Multi-Row variable set (came out in London) is lacking referential integrity.
When records are deleted from the REQ table, records are left in the Multi-Row variable set - sc_multi_row_question_answer table.
Cause
There are multiple situations that lead to the creation of records in the sc_multi_row_question_answer table.
- The parent of a record in the said table could be a cart item, but it could also be a requested item.
- In new releases, we have features where we allow table variable data to be moved across records.
For these reasons, we have not provided a cascade delete of records in the sc_multi_row_question_answer table on the deletion of related records, which is present for other applications on ServiceNow.
As far as feature breakage is concerned, this lack of a cascade delete should not cause any breaks OOB.
Resolution
One can implement a cascade delete by writing the business rule to trigger when RITM is deleted, cascade deletes the related "Multi-Row Question Answers" records.
Related Links
Steps to Reproduce:
- On any OOB London and above version instance, Submit the following catalog item request by adding multi-row variable set records.
- https://<instance-name>.service-now.com/sc_cat_item.do?sys_id=e56a7ffe41011300964ff05369414ebd
- Open "Multi-Row Question Answers" you will there the related multi-row variable record values for the related RITM.
- https://<instance-name>.service-now.com/sc_multi_row_question_answer_list.do
- Delete the RITM
You will notice that the "Multi-Row Question Answers" records are still present.