USP_DATAFORMTEMPLATE_EDITLOAD_CAMPAIGNHIERARCHY
The load procedure used by the edit dataform template "Campaign Hierarchy 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. |
@CAMPAIGNHIERARCHY | xml | INOUT | Hierarchy |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_CAMPAIGNHIERARCHY (
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@CAMPAIGNHIERARCHY xml = null output
) as begin
set nocount on;
declare @HIERARCHYPATH hierarchyid;
select
@DATALOADED = 1,
@HIERARCHYPATH = CAMPAIGN.HIERARCHYPATH
from
dbo.CAMPAIGN
where
CAMPAIGN.ID = @ID;
select @CAMPAIGNHIERARCHY = dbo.UFN_CAMPAIGNHIERARCHY_TOXML(@HIERARCHYPATH);
return 0;
end