USP_SALESDEPOSITPROCESSSTATUS_DELETE

Executes the "Sales Deposit Process Status: Delete" record operation.

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN Input parameter indicating the ID of the record being deleted.
@CHANGEAGENTID uniqueidentifier IN Input parameter indicating the ID of the change agent invoking the delete.

Definition

Copy


                    CREATE procedure dbo.USP_SALESDEPOSITPROCESSSTATUS_DELETE
                    (
                        @ID uniqueidentifier,
                        @CHANGEAGENTID uniqueidentifier
                    )
                    as begin
                        if exists (
                            select [ID] 
                            from dbo.[BUSINESSPROCESSSTATUS] 
                            where 
                                [ID] = @ID and 
                                STATUSCODE = 1
                            )
                            raiserror('BBERR_PROCESSRUNNING.',13,1);    


                        exec dbo.USP_BUSINESSPROCESSSTATUS_DELETEBYID_WITHCHANGEAGENTID @ID, @CHANGEAGENTID
                        return 0;

                    end