USP_DATAFORMTEMPLATE_ADD_ACTION_CENTER
The save procedure used by the add dataform template "Action Center Add Form".
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | INOUT | The output parameter indicating the ID of the record added. |
@CHANGEAGENTID | uniqueidentifier | IN | Input parameter indicating the ID of the change agent invoking the procedure. |
@ACTIONITEMID | uniqueidentifier | IN | Actionitem |
@SITECONTENTID | int | IN | Sitecontent |
@PRIORITYCODE | tinyint | IN | Priority |
@SORTORDER | int | IN | Sortorder |
@DISPLAYAINAMELIST | bit | IN | DisplayAINameList |
@DISPLAYSYNOPSIS | bit | IN | DisplaySynopsis |
@DISPLAYTHUMBNAIL | bit | IN | DisplayThumbnail |
@DISPLAYAINAME | bit | IN | DisplayAIName |
@DISPLAYFULLDESCRIPTION | bit | IN | DisplayFullDescription |
@DISPLAYLOGO | bit | IN | DisplayLogo |
@STORYID | int | IN | StoryID |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_ADD_ACTION_CENTER
(
@ID uniqueidentifier = null output,
@CHANGEAGENTID uniqueidentifier = null,
@ACTIONITEMID uniqueidentifier,
@SITECONTENTID int,
@PRIORITYCODE tinyint = 0,
@SORTORDER int = 0,
@DISPLAYAINAMELIST bit = 1,
@DISPLAYSYNOPSIS bit = 1,
@DISPLAYTHUMBNAIL bit = 1,
@DISPLAYAINAME bit = 1,
@DISPLAYFULLDESCRIPTION bit = 1,
@DISPLAYLOGO bit = 1,
@STORYID int = null
)
as
set nocount on;
if @ID is null
set @ID = newid()
if @CHANGEAGENTID is null
exec dbo.USP_CHANGEAGENT_GETORCREATECHANGEAGENT @CHANGEAGENTID output
declare @CURRENTDATE datetime
set @CURRENTDATE = getdate()
begin try
-- handle inserting the data
insert into dbo.ACTIONCENTER
(ID, ACTIONITEMID, SITECONTENTID, PRIORITYCODE, SORTORDER, DISPLAYAINAMELIST, DISPLAYSYNOPSIS, DISPLAYTHUMBNAIL, DISPLAYAINAME, DISPLAYFULLDESCRIPTION, DISPLAYLOGO, ADDEDBYID, CHANGEDBYID, DATEADDED, DATECHANGED, STORYID)
values
(@ID, @ACTIONITEMID, @SITECONTENTID, @PRIORITYCODE, @SORTORDER, @DISPLAYAINAMELIST, @DISPLAYSYNOPSIS, @DISPLAYTHUMBNAIL, @DISPLAYAINAME, @DISPLAYFULLDESCRIPTION, @DISPLAYLOGO, @CHANGEAGENTID, @CHANGEAGENTID, @CURRENTDATE, @CURRENTDATE, @STORYID)
end try
begin catch
exec dbo.USP_RAISE_ERROR
return 1
end catch
return 0