USP_DATAFORMTEMPLATE_EDITLOAD_CONSTITUENT_EMAILADDRESS_DONOTEMAIL
The load procedure used by the edit dataform template "ConstituentEmailAddressDoNotEmail Edit Data 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. |
@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. |
@EMAILADDRESSID | uniqueidentifier | INOUT | Email Address ID |
@EMAILADDRESS | nvarchar(100) | INOUT | Email Address |
@DONOTEMAIL | bit | INOUT | Do not email |
Definition
Copy
create procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_CONSTITUENT_EMAILADDRESS_DONOTEMAIL(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@TSLONG bigint = 0 output,
@EMAILADDRESSID uniqueidentifier = null output,
@EMAILADDRESS nvarchar(100) = null output,
@DONOTEMAIL bit = null output
)
as
set nocount on;
select
@DATALOADED = 1,
@TSLONG = TSLONG
from dbo.[CONSTITUENT]
where [ID] = @ID
--Get an email address for the constituent, starting with primary
select top 1
@EMAILADDRESSID = [EMAILADDRESS].[ID],
@EMAILADDRESS = [EMAILADDRESS].[EMAILADDRESS],
@DONOTEMAIL = [EMAILADDRESS].[DONOTEMAIL]
from dbo.[EMAILADDRESS]
where [EMAILADDRESS].[CONSTITUENTID] = @ID
order by [EMAILADDRESS].[ISPRIMARY] desc
return 0;