USP_DATAFORMTEMPLATE_EDITLOAD_CONSTITUENTAPPEAL

The load procedure used by the edit dataform template "Constituent Appeal Edit Form"

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN The input ID parameter used to load the fields defined on the form.
@DATALOADED bit INOUT Output parameter indicating whether or not data was actually loaded.
@APPEALID uniqueidentifier INOUT Appeal
@MKTSEGMENTATIONID uniqueidentifier INOUT Mailing
@SOURCECODE nvarchar(50) INOUT Source code
@DATESENT datetime INOUT Date sent
@COMMENTS nvarchar(255) INOUT Comments
@MKTPACKAGEID uniqueidentifier INOUT Package
@TSLONG bigint INOUT Output parameter indicating the TSLONG value of the record being edited. This is used to manage multi-user concurrency issues when multiple users access the same record.
@ISREADONLY bit INOUT

Definition

Copy


CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_CONSTITUENTAPPEAL
(
  @ID uniqueidentifier,
  @DATALOADED bit = 0 output,
  @APPEALID uniqueidentifier = null output,
  @MKTSEGMENTATIONID uniqueidentifier = null output,
  @SOURCECODE nvarchar(50) = null output,
  @DATESENT datetime = null output,
  @COMMENTS nvarchar(255) = null output,
  @MKTPACKAGEID uniqueidentifier = null output,
  @TSLONG bigint = 0 output,
  @ISREADONLY bit = null output
)
as
  set nocount on;

  set @DATALOADED = 0;
  set @TSLONG = 0;

  select
    @DATALOADED = 1,
    @APPEALID = APPEALID,
    @MKTSEGMENTATIONID = MKTSEGMENTATIONID,
    @SOURCECODE = SOURCECODE,
    @DATESENT = DATESENT,
    @COMMENTS = COMMENTS,
    @MKTPACKAGEID = MKTPACKAGEID,
    @TSLONG = TSLONG,
    @ISREADONLY = case when MKTSEGMENTATIONSEGMENTID is null then 0 else 1 end
  from
    dbo.CONSTITUENTAPPEAL
  where ID = @ID;

  return 0;