USP_RECORDOPERATION_FLAGGEDPROSPECT_DELETE
Executes the "Prospect: Unflag" record operation.
Parameters
| Parameter | Parameter Type | Mode | Description | 
|---|---|---|---|
| @ID | uniqueidentifier | IN | Input parameter indicating the ID of the record being updated. | 
| @CURRENTAPPUSERID | uniqueidentifier | IN | Input parameter indicating the ID of the current user. | 
| @CHANGEAGENTID | uniqueidentifier | IN | Input parameter indicating the ID of the change agent invoking the update. | 
Definition
 Copy 
                                    
                    CREATE procedure dbo.USP_RECORDOPERATION_FLAGGEDPROSPECT_DELETE (
                        @ID uniqueidentifier,
                        @CURRENTAPPUSERID uniqueidentifier,
                        @CHANGEAGENTID uniqueidentifier = null
                    ) as begin
                        set nocount on;
                        declare @FLAGID uniqueidentifier
                        select @FLAGID=ID from dbo.FLAGGEDPROSPECT where APPUSERID=@CURRENTAPPUSERID and PROSPECTID=@ID
                        if @FLAGID is not null
                            exec USP_FLAGGEDPROSPECT_DELETEBYID_WITHCHANGEAGENTID @FLAGID, @CHANGEAGENTID
                        return 0
                    end