Exercise 4: Delete Record Operation Spec a.k.a. "Batch Delete"
Step 1 - Review the following record operation spec.
This spec defines a record operation that deletes a row from the batch staging table.
<RecordOperationSpec xmlns:common="bb_appfx_commontypes" ID="42b3c606-57ff-4ec1-9cf7-3fb2875471f2" Name="Food Item Add Batch Row: Delete" Description="This deletion handles the deletion rules for deleting a Food Item Add Batch row." Author="Technical Training" RecordType="Food Item Add Batch" OperationType="Delete" common:SecurityUIFolder="Constituent\Food Bank\Food Item\Batch" xmlns="bb_appfx_recordoperation"> <SPRecord> <SPOperationImplementation SPName="USR_USP_BATCHFOODITEMADD_DELETE"> <common:CreateProcedureSQL> <![CDATA[ create procedure dbo.USR_USP_BATCHFOODITEMADD_DELETE ( @ID uniqueidentifier, @CHANGEAGENTID uniqueidentifier) as set nocount on; exec USP_USR_BATCHFOODITEMADD_DELETEBYID_WITHCHANGEAGENTID @ID, @CHANGEAGENTID; return 0; ]]></common:CreateProcedureSQL> </SPOperationImplementation> </SPRecord> <Prompt> <StandardPrompt Text="Are you sure you want to delete this food item batch row?" /> </Prompt> </RecordOperationSpec>
Step 2 - Ensure the wrapped stored procedure exists within the database.
USP_USR_BATCHFOODITEMADD_DELETEBYID_WITHCHANGEAGENTID was created on your behalf by the Infinity platform when the USR_BATCHFOODITEMADD table was loaded. Ensure this stored procedure exists within the database. Double-check the name of the stored procedure within the database versus the name of the stored procedure executed within the Record Operation Spec.
Step 3 - Load the spec.