USP_DATAFORMTEMPLATE_EDITLOAD_CONSTITUENTNAMEFORMAT
The load procedure used by the edit dataform template "Constituent Name Format Edit Form"
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN | The input ID parameter used to load the fields defined on the form. |
@CONSTITUENTID | uniqueidentifier | INOUT | Constituent ID |
@NAMEFORMATFUNCTIONID | uniqueidentifier | INOUT | Name |
@NAMEFORMATTYPECODEID | uniqueidentifier | INOUT | Type |
@PRIMARYADDRESSEE | bit | INOUT | Primary addressee |
@PRIMARYSALUTATION | bit | INOUT | Primary salutation |
@CUSTOMNAME | nvarchar(700) | INOUT | Custom name |
@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. |
@SITEID | uniqueidentifier | INOUT | Site |
@CURRENTAPPUSERID | uniqueidentifier | IN | Input parameter indicating the ID of the current user. |
@SITEREQUIRED | bit | INOUT | Site Required |
@NAMEFORMATFUNCTIONS | xml | INOUT |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_CONSTITUENTNAMEFORMAT
(
@ID uniqueidentifier,
@CONSTITUENTID uniqueidentifier = null output,
@NAMEFORMATFUNCTIONID uniqueidentifier = null output,
@NAMEFORMATTYPECODEID uniqueidentifier = null output,
@PRIMARYADDRESSEE bit = null output,
@PRIMARYSALUTATION bit = null output,
@CUSTOMNAME nvarchar(700) = null output,
@DATALOADED bit = 0 output,
@TSLONG bigint = 0 output,
@SITEID uniqueidentifier = null output,
@CURRENTAPPUSERID uniqueidentifier = null,
@SITEREQUIRED bit = null output,
@NAMEFORMATFUNCTIONS xml = null output
)
as
select
@CONSTITUENTID = CONSTITUENTID,
@NAMEFORMATFUNCTIONID = NAMEFORMATFUNCTIONID,
@NAMEFORMATTYPECODEID = NAMEFORMATTYPECODEID,
@PRIMARYADDRESSEE = PRIMARYADDRESSEE,
@PRIMARYSALUTATION = PRIMARYSALUTATION,
@CUSTOMNAME = CUSTOMNAME,
@DATALOADED = 1,
@TSLONG = TSLONG,
@SITEID = SITEID,
@SITEREQUIRED =
case
when NAMEFORMAT.SITEID is null then
0
else
dbo.UFN_SITEREQUIREDFORUSER(@CURRENTAPPUSERID)
end,
@NAMEFORMATFUNCTIONS = dbo.UFN_CONSTITUENT_NAMEFORMATFUNCTIONS_TOITEMLISTXML(@CONSTITUENTID)
from
dbo.NAMEFORMAT
where
ID = @ID
return 0;