USP_DATAFORMTEMPLATE_EDITLOAD_MKTPACKAGE_MAIL
The load procedure used by the edit dataform template "Package Edit Form (Mail Channel)"
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. |
@NAME | nvarchar(100) | INOUT | Name |
@DESCRIPTION | nvarchar(255) | INOUT | Description |
@CODE | nvarchar(10) | INOUT | Code |
@COST | money | INOUT | Base cost |
@COSTDISTRIBUTIONMETHODCODE | tinyint | INOUT | Distribution |
@INSERTCOSTPERPIECE | money | INOUT | Additional content cost |
@TOTALCOSTPERPIECE | money | INOUT | Total per piece cost |
@SITEID | uniqueidentifier | INOUT | Site |
@SITEREQUIRED | bit | INOUT | Site required? |
@SITECANBECHANGED | bit | INOUT | Site can be changed? |
@CHANNELCODE | tinyint | INOUT | Channel |
@CATEGORYCODEID | uniqueidentifier | INOUT | Category |
@LETTERCODEID | uniqueidentifier | INOUT | Letter |
@EXPORTDEFINITIONID | uniqueidentifier | INOUT | Export definition |
@EXPORTDEFINITIONDERIVEDFROMCONTENT | bit | INOUT | Export definition derived from content? |
@CONTENTCANBECHANGED | bit | INOUT | Content can be changed? |
@CONTENTMAILINGTYPECODEALLOWED | tinyint | INOUT | Content marketing effort type code allowed |
@ACKNOWLEDGEMENTMAILINGSINSTALLED | bit | INOUT | Marketing Acknowledgement installed? |
@MEMBERSHIPMAILINGSINSTALLED | bit | INOUT | Membership renewal efforts installed? |
@CODEVALUEID | uniqueidentifier | INOUT | Code value ID |
@CHANNELSOURCECODE | nvarchar(10) | INOUT | Channel source code |
@CHANNELSOURCECODEVALUEID | uniqueidentifier | INOUT | Channel code value 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. |
@BASECURRENCYID | uniqueidentifier | INOUT | Currency |
@PACKAGEPARTDEFINITIONID | uniqueidentifier | INOUT | Package part definition ID |
@CHANNELPARTDEFINITIONID | uniqueidentifier | INOUT | Channel part definition ID |
@SPONSORSHIPMAILINGSINSTALLED | bit | INOUT |
Definition
Copy
CREATE procedure dbo.[USP_DATAFORMTEMPLATE_EDITLOAD_MKTPACKAGE_MAIL]
(
@ID uniqueidentifier,
@CURRENTAPPUSERID uniqueidentifier,
@DATALOADED bit = 0 output,
@NAME nvarchar(100) = null output,
@DESCRIPTION nvarchar(255) = null output,
@CODE nvarchar(10) = null output,
@COST money = null output,
@COSTDISTRIBUTIONMETHODCODE tinyint = null output,
@INSERTCOSTPERPIECE money = null output,
@TOTALCOSTPERPIECE money = null output,
@SITEID uniqueidentifier = null output,
@SITEREQUIRED bit = null output,
@SITECANBECHANGED bit = null output,
@CHANNELCODE tinyint = null output,
@CATEGORYCODEID uniqueidentifier = null output,
@LETTERCODEID uniqueidentifier = null output,
@EXPORTDEFINITIONID uniqueidentifier = null output,
@EXPORTDEFINITIONDERIVEDFROMCONTENT bit = null output,
@CONTENTCANBECHANGED bit = null output,
@CONTENTMAILINGTYPECODEALLOWED tinyint = null output,
@ACKNOWLEDGEMENTMAILINGSINSTALLED bit = null output,
@MEMBERSHIPMAILINGSINSTALLED bit = null output,
@CODEVALUEID uniqueidentifier = null output,
@CHANNELSOURCECODE nvarchar(10) = null output,
@CHANNELSOURCECODEVALUEID uniqueidentifier = null output,
@TSLONG bigint = 0 output,
@BASECURRENCYID uniqueidentifier = null output,
@PACKAGEPARTDEFINITIONID uniqueidentifier = null output,
@CHANNELPARTDEFINITIONID uniqueidentifier = null output,
@SPONSORSHIPMAILINGSINSTALLED bit = null output
)
as
set nocount on;
exec dbo.[USP_MKTPACKAGE_EDITLOAD] @ID, @CURRENTAPPUSERID, @DATALOADED output, @NAME output, @DESCRIPTION output, @CODE output, @COST output, @COSTDISTRIBUTIONMETHODCODE output, @INSERTCOSTPERPIECE output, @TOTALCOSTPERPIECE output, @SITEID output, @SITEREQUIRED output, @SITECANBECHANGED output, @CHANNELCODE output, @CATEGORYCODEID output, @EXPORTDEFINITIONID output, @CONTENTCANBECHANGED output, @CONTENTMAILINGTYPECODEALLOWED output, @ACKNOWLEDGEMENTMAILINGSINSTALLED output, @MEMBERSHIPMAILINGSINSTALLED output, @CODEVALUEID output, @CHANNELSOURCECODE output, @CHANNELSOURCECODEVALUEID output, @TSLONG output, @BASECURRENCYID output, @PACKAGEPARTDEFINITIONID output, @CHANNELPARTDEFINITIONID output, @SPONSORSHIPMAILINGSINSTALLED output;
if @DATALOADED = 1
begin
set @DATALOADED = 0;
select
@DATALOADED = 1,
@LETTERCODEID = [MKTPACKAGE].[LETTERCODEID],
@EXPORTDEFINITIONDERIVEDFROMCONTENT = convert(bit, case when [LETTERCODE].[EXPORTDEFINITIONID] is null then 0 else 1 end)
from dbo.[MKTPACKAGE]
left outer join dbo.[LETTERCODE] on [LETTERCODE].[ID] = [MKTPACKAGE].[LETTERCODEID]
where [MKTPACKAGE].[ID] = @ID;
end
set @SITEREQUIRED = dbo.[UFN_SITEREQUIREDFORUSERONFEATURE](@CURRENTAPPUSERID, '874d9f7e-3da1-48e3-ad2e-715dda9e7f55', 1)
return 0;