USP_RECORDOPERATION_ATTRIBUTEFORMEXTENSIONTOGGLEENABLED

Executes the "Attribute Form Extension: Toggle Enabled" record operation.

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN Input parameter indicating the ID of the record being updated.
@CHANGEAGENTID uniqueidentifier IN Input parameter indicating the ID of the change agent invoking the update.

Definition

Copy


create procedure dbo.USP_RECORDOPERATION_ATTRIBUTEFORMEXTENSIONTOGGLEENABLED(@ID uniqueidentifier,
    @CHANGEAGENTID uniqueidentifier)
as
    set nocount on;

    declare @DATAFORMEXTENSIONID uniqueidentifier;

    select @DATAFORMEXTENSIONID = EXTENSIONDATAFORMINSTANCECATALOGID from dbo.ATTRIBUTEFORMEXTENSION where ID = @ID;

    update dbo.DATAFORMEXTENSION set ENABLED = case ENABLED when 1 then 0 else 1 end,
        CHANGEDBYID = @CHANGEAGENTID,
        DATECHANGED = getdate()
    where ID = @DATAFORMEXTENSIONID;