USP_DATAFORMTEMPLATE_ADD_EXPORTPROCESS_2
The save procedure used by the add dataform template "Export Process Add Form 2".
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | INOUT | The output parameter indicating the ID of the record added. |
@ADHOCQUERYID | uniqueidentifier | IN | Ad-hoc query |
@SMARTQUERYINSTANCEID | uniqueidentifier | IN | Smart query instance |
@CHANGEAGENTID | uniqueidentifier | IN | Input parameter indicating the ID of the change agent invoking the procedure. |
@NAME | nvarchar(255) | IN | Name |
@DESCRIPTION | nvarchar(1000) | IN | Description |
@CURRENTAPPUSERID | uniqueidentifier | IN | Input parameter indicating the ID of the current user. |
@EXPORTDEFINITIONID | uniqueidentifier | IN | Export definition |
@SELECTIONID | uniqueidentifier | IN | Selection |
@SITEID | uniqueidentifier | IN | Site |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_ADD_EXPORTPROCESS_2
(
@ID uniqueidentifier = null output,
@ADHOCQUERYID uniqueidentifier = null,
@SMARTQUERYINSTANCEID uniqueidentifier = null,
@CHANGEAGENTID uniqueidentifier = null,
@NAME nvarchar(255) = '',
@DESCRIPTION nvarchar(1000) = '',
@CURRENTAPPUSERID uniqueidentifier,
@EXPORTDEFINITIONID uniqueidentifier = null,
@SELECTIONID uniqueidentifier = null,
@SITEID uniqueidentifier = null
)
with execute as caller
as begin
set nocount on;
begin try
if @SITEID is not null
if dbo.UFN_SITEALLOWEDFORUSER(@CURRENTAPPUSERID, @SITEID) = 0
begin
raiserror('ERR_SITE_NOACCESS', 13, 1);
return 1;
end
exec dbo.USP_EXPORTPROCESS_ADD @ID output, @ADHOCQUERYID, @SMARTQUERYINSTANCEID, @CHANGEAGENTID, @NAME, @DESCRIPTION, @EXPORTDEFINITIONID, @SELECTIONID;
exec dbo.USP_BUSINESSPROCESSINSTANCE_ADD
@CHANGEAGENTID = @CHANGEAGENTID,
@BUSINESSPROCESSCATALOGID = '64FAA344-9C75-4C98-AFE3-A40EC2DF9249',
@BUSINESSPROCESSPARAMETERSETID = @ID,
@OWNERID = @CURRENTAPPUSERID, @SITEID = @SITEID;
end try
begin catch
exec dbo.USP_RAISE_ERROR;
return 1;
end catch
return 0;
end