USP_DATAFORMTEMPLATE_EDIT_ACTION_CENTER

The save procedure used by the edit dataform template "Action Center Edit Form".

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN The input ID parameter indicating the ID of the record being edited.
@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

Definition

Copy


CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDIT_ACTION_CENTER
(
    @ID uniqueidentifier,
    @CHANGEAGENTID uniqueidentifier = null,
    @ACTIONITEMID uniqueidentifier,
    @SITECONTENTID int,
    @PRIORITYCODE tinyint,
    @SORTORDER int,
    @DISPLAYAINAMELIST bit,
    @DISPLAYSYNOPSIS bit,
    @DISPLAYTHUMBNAIL bit,
    @DISPLAYAINAME bit,
    @DISPLAYFULLDESCRIPTION bit,
    @DISPLAYLOGO bit
)
as

    set nocount on;

    if @CHANGEAGENTID is null  
        exec dbo.USP_CHANGEAGENT_GETORCREATECHANGEAGENT @CHANGEAGENTID output

    begin try
        -- handle updating the data

        update dbo.ACTIONCENTER set
            ACTIONITEMID = @ACTIONITEMID,
            SITECONTENTID = @SITECONTENTID,
            PRIORITYCODE = @PRIORITYCODE,
            SORTORDER = @SORTORDER,
            DISPLAYAINAMELIST = @DISPLAYAINAMELIST,
            DISPLAYSYNOPSIS = @DISPLAYSYNOPSIS,
            DISPLAYTHUMBNAIL = @DISPLAYTHUMBNAIL,
            DISPLAYAINAME = @DISPLAYAINAME,
            DISPLAYFULLDESCRIPTION = @DISPLAYFULLDESCRIPTION,
            DISPLAYLOGO = @DISPLAYLOGO,

            CHANGEDBYID = @CHANGEAGENTID,
            DATECHANGED = getdate()
        where ID = @ID
    end try
    begin catch
        exec dbo.USP_RAISE_ERROR
        return 1
    end catch

return 0;