USP_DATAFORMTEMPLATE_EDITLOAD_MKTMARKETINGPLANTEMPLATE

The load procedure used by the edit dataform template "Marketing Plan Template 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.
@NAME nvarchar(50) INOUT Name
@ISDEFAULT bit INOUT Use this template as the default for new marketing plans
@ITEMLIST xml INOUT Items
@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.

Definition

Copy


CREATE procedure dbo.[USP_DATAFORMTEMPLATE_EDITLOAD_MKTMARKETINGPLANTEMPLATE]
(
  @ID uniqueidentifier,
  @DATALOADED bit = 0 output,
  @NAME nvarchar(50) = null output,
  @ISDEFAULT bit = null output,
  @ITEMLIST xml = null output,
  @TSLONG bigint = 0 output
)
as
begin
  set nocount on;

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

  select
    @DATALOADED = 1,
    @NAME = M.NAME,
    @ISDEFAULT = M.ISDEFAULT,
    @ITEMLIST = dbo.UFN_MKTMARKETINGPLANTEMPLATE_GETITEMLIST_TOITEMLISTXML(M.ID),
    @TSLONG = TSLONG
  from
    dbo.[MKTMARKETINGPLANTEMPLATE] M
  where
    ID = @ID;

  return 0;
          end