USP_DATAFORMTEMPLATE_ADD_EXPORTPROCESS_FROMADHOCQUERY
The save procedure used by the add dataform template "Export Process From Ad-hoc Query Add Form".
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | INOUT | The output parameter indicating the ID of the record added. |
@ADHOCQUERYID | uniqueidentifier | IN | Input parameter indicating the context ID for the record being added. |
@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. |
@SITEID | uniqueidentifier | IN | Site |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_ADD_EXPORTPROCESS_FROMADHOCQUERY(
@ID uniqueidentifier = null output,
@ADHOCQUERYID uniqueidentifier,
@CHANGEAGENTID uniqueidentifier = null,
@NAME nvarchar(255) = '',
@DESCRIPTION nvarchar(1000) = '',
@CURRENTAPPUSERID uniqueidentifier = null,
@SITEID uniqueidentifier = null)
with execute as caller
as
set nocount on;
begin try
if (@SITEID is not null)
begin
if dbo.UFN_SITEALLOWEDFORUSER(@CURRENTAPPUSERID, @SITEID) = 0 begin
raiserror ('ERR_SITE_NOACCESS',13,1);
return 1;
end
end
exec dbo.USP_EXPORTPROCESS_ADD @ID output, @ADHOCQUERYID, null, @CHANGEAGENTID, @NAME, @DESCRIPTION;
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;