USP_DATAFORMTEMPLATE_EDITLOAD_MKTSEGMENTWHITEMAIL
The load procedure used by the edit dataform template "White Segment Edit Form"
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN | The input ID parameter used to load the fields defined on the form. |
@CURRENTAPPUSERID | uniqueidentifier | IN | Input parameter indicating the ID of the current user. |
@DATALOADED | bit | INOUT | Output parameter indicating whether or not data was actually loaded. |
@QUERYVIEWCATALOGID | uniqueidentifier | INOUT | Record source |
@NAME | nvarchar(100) | INOUT | Name |
@DESCRIPTION | nvarchar(255) | INOUT | Description |
@SEGMENTCATEGORYCODEID | uniqueidentifier | INOUT | Category |
@SEGMENTATIONID | uniqueidentifier | INOUT | Marketing effort |
@STATUSCODE | tinyint | INOUT | Status |
@ACTIVEFROM | date | INOUT | Active from |
@ACTIVETO | date | INOUT | Active to |
@SOURCECODEID | uniqueidentifier | INOUT | Source code |
@SOURCECODEITEMLIST | xml | INOUT | Source code items |
@CODEVALUEID | uniqueidentifier | INOUT | Code value ID |
@CODE | nvarchar(10) | INOUT | Code |
@GROUPS | xml | INOUT | Groups |
@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_MKTSEGMENTWHITEMAIL]
(
@ID uniqueidentifier,
@CURRENTAPPUSERID uniqueidentifier,
@DATALOADED bit = 0 output,
@QUERYVIEWCATALOGID uniqueidentifier = null output,
@NAME nvarchar(100) = null output,
@DESCRIPTION nvarchar(255) = null output,
@SEGMENTCATEGORYCODEID uniqueidentifier = null output,
@SEGMENTATIONID uniqueidentifier = null output,
@STATUSCODE tinyint = null output,
@ACTIVEFROM date = null output,
@ACTIVETO date = null output,
@SOURCECODEID uniqueidentifier = null output,
@SOURCECODEITEMLIST xml = null output,
@CODEVALUEID uniqueidentifier = null output,
@CODE nvarchar(10) = null output,
@GROUPS xml = null output,
@TSLONG bigint = 0 output
)
as
set nocount on;
exec dbo.[USP_DATAFORMTEMPLATE_EDITLOAD_MKTSEGMENT_2]
@ID = @ID,
@CURRENTAPPUSERID = @CURRENTAPPUSERID,
@DATALOADED = @DATALOADED output,
@NAME = @NAME output,
@DESCRIPTION = @DESCRIPTION output,
@SEGMENTCATEGORYCODEID = @SEGMENTCATEGORYCODEID output,
@CODE = @CODE output,
@QUERYVIEWCATALOGID = @QUERYVIEWCATALOGID output,
@SELECTIONS = null,
@GROUPS = @GROUPS output,
@SMARTQUERIESEXIST = null,
@ISINUSE = null,
@DATECHANGED = null,
@ALLOWCODEUPDATE = null,
@CODEVALUEID = @CODEVALUEID output,
@TSLONG = @TSLONG output;
if @DATALOADED = 1
begin
set @DATALOADED = 0;
select
@DATALOADED = 1,
@SEGMENTATIONID = [SEGMENTATIONID],
@STATUSCODE = [STATUSCODE],
@ACTIVEFROM = [ACTIVEFROM],
@ACTIVETO = [ACTIVETO],
@SOURCECODEID = [SOURCECODEID],
@SOURCECODEITEMLIST = dbo.[UFN_MKTSOURCECODEPART_WHITEMAILSEGMENT_GETITEMLIST_TOITEMLISTXML](@ID)
from dbo.[MKTSEGMENTWHITEMAIL]
where [ID] = @ID;
end
return 0;