Stored Procedures [dbo].[MssWebCreateDuplicateOrder]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Parameters
NameData TypeMax Length (Bytes)
@inOrderIDint4
@inSysuserIDint4
@inCompleteOrderbit1
@inBasicInformationbit1
@inBasicInformationReversebit1
@inIncludeNotesFlagbit1
Permissions
TypeActionOwning Principal
GrantExecuteMssExec
SQL Script
create procedure [dbo].[MssWebCreateDuplicateOrder]
    @inOrderID int,
    @inSysuserID int,
    @inCompleteOrder bit,
    @inBasicInformation bit,
    @inBasicInformationReverse bit,
    @inIncludeNotesFlag bit
as
set nocount on

declare @duplicateOrderID int
declare @taskDefinitionId int;
begin

    exec DuplicateOrder @inOrderID,@inSysuserID,@inBasicInformation,@inBasicInformationReverse,@inCompleteOrder,@inIncludeNotesFlag,@duplicateOrderID output ;
    
    select @taskDefinitionId = Orders.ProfileId from Orders where PriKey = @duplicateOrderID;
    
    update Orders
    set ProfileID = null
    where PriKey = @duplicateOrderID;

    select DuplicateOrderId = @duplicateOrderID ,TaskDefinitionId = @taskDefinitionId;
end
GO
GRANT EXECUTE ON  [dbo].[MssWebCreateDuplicateOrder] TO [MssExec]
GO
Uses