[dbo].[MssWebCreateDuplicateOrder]
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