USP_MERCHANDISEPRODUCT_DELETE
Executes the "Merchandise Item 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_MERCHANDISEPRODUCT_DELETE
                (
                    @ID uniqueidentifier,
                    @CHANGEAGENTID uniqueidentifier
                )
                as begin
                    --Cache current context information 
                    declare @CONTEXTCACHE varbinary(128); 
                    set @CONTEXTCACHE = CONTEXT_INFO(); 
                    --Set CONTEXT_INFO to @CHANGEAGENTID 
                    if @CHANGEAGENTID is not null 
                      set CONTEXT_INFO @CHANGEAGENTID; 
                    delete from dbo.PRODUCTVENDOR
                    where PRODUCTID = @ID
                    --Reset CONTEXT_INFO to previous value 
                    if not @CONTEXTCACHE is null 
                      set CONTEXT_INFO @CONTEXTCACHE;
                    exec USP_PRODUCT_DELETEBYID_WITHCHANGEAGENTID @ID, @CHANGEAGENTID
                    return 0;
                end