USP_DATAFORMTEMPLATE_EDITLOAD_MKTSEGMENTATIONSEED
The load procedure used by the edit dataform template "Marketing Effort Seeds 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. |
@SEEDS | xml | INOUT | Seeds |
@SEGMENTATIONACTIVE | bit | INOUT | Active |
@SEGMENTATIONSITEID | uniqueidentifier | INOUT | Marketing effort site id |
@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. |
@DEFAULTCOUNTRYID | uniqueidentifier | INOUT |
Definition
Copy
CREATE procedure dbo.[USP_DATAFORMTEMPLATE_EDITLOAD_MKTSEGMENTATIONSEED]
(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@SEEDS xml = null output,
@SEGMENTATIONACTIVE bit = null output,
@SEGMENTATIONSITEID uniqueidentifier = null output,
@TSLONG bigint = 0 output,
@DEFAULTCOUNTRYID uniqueidentifier = null output
)
as
/* @ID is the Mailing ID */
set nocount on;
set @DATALOADED = 0;
set @TSLONG = 0;
select
@DATALOADED = 1,
@SEGMENTATIONACTIVE = [ACTIVE],
@SEGMENTATIONSITEID = [SITEID]
from dbo.[MKTSEGMENTATION]
where [ID] = @ID;
if @DATALOADED = 1 and @SEGMENTATIONACTIVE = 0
begin
--Check if the mailing is currently being activated...
declare @R int;
exec @R = dbo.[USP_MKTSEGMENTATION_CHECKACTIVATION] @ID;
if @R <> 0
begin
set @DATALOADED = 0;
return 1;
end
end
exec @SEEDS = dbo.[UFN_MKTSEGMENTATIONSEED_GETSEEDS_TOITEMLISTXML] @ID;
set @DEFAULTCOUNTRYID = dbo.[UFN_COUNTRY_GETDEFAULT]();
return 0;