USP_DATAFORMTEMPLATE_EDITLOAD_NAMINGOPPORTUNITY
The load procedure used by the edit dataform template "Naming Opportunity Edit Form"
Parameters
| Parameter | Parameter Type | Mode | Description |
|---|---|---|---|
| @CURRENTAPPUSERID | uniqueidentifier | IN | Input parameter indicating the ID of the current user. |
| @ID | uniqueidentifier | IN | The input ID parameter used to load the fields defined on the form. |
| @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. |
| @DATALOADED | bit | INOUT | Output parameter indicating whether or not data was actually loaded. |
| @NAME | nvarchar(100) | INOUT | Name |
| @DESCRIPTION | nvarchar(100) | INOUT | Description |
| @TYPECODEID | uniqueidentifier | INOUT | Type |
| @CONTACTID | uniqueidentifier | INOUT | Contact |
| @QUANTITY | int | INOUT | Quantity |
| @PURPOSEID | uniqueidentifier | INOUT | Fundraising purpose |
| @FACILITYID | uniqueidentifier | INOUT | Facility |
| @CAMPAIGNID | uniqueidentifier | INOUT | Campaign |
| @MINIMUMAMOUNT | money | INOUT | Minimum gift amount |
| @SITEID | uniqueidentifier | INOUT | Site |
| @SITEREQUIRED | bit | INOUT | Site Required |
| @BASECURRENCYID | uniqueidentifier | INOUT | Base currency |
Definition
Copy
CREATE procedure USP_DATAFORMTEMPLATE_EDITLOAD_NAMINGOPPORTUNITY
(
@CURRENTAPPUSERID uniqueidentifier,
@ID uniqueidentifier,
@TSLONG bigint = 0 output,
@DATALOADED bit = 0 output,
@NAME nvarchar(100) = null output,
@DESCRIPTION nvarchar(100) = null output,
@TYPECODEID uniqueidentifier = null output,
@CONTACTID uniqueidentifier = null output,
@QUANTITY int = null output,
@PURPOSEID uniqueidentifier = null output,
@FACILITYID uniqueidentifier = null output,
@CAMPAIGNID uniqueidentifier = null output,
@MINIMUMAMOUNT money = null output,
@SITEID uniqueidentifier = null output,
@SITEREQUIRED bit = null output,
@BASECURRENCYID uniqueidentifier = null output
)
as
begin
set nocount on;
set @DATALOADED = 0;
set @TSLONG = 0;
select
@DATALOADED = 1,
@NAME = NAME,
@DESCRIPTION = DESCRIPTION,
@TYPECODEID = NAMINGOPPORTUNITYTYPECODEID,
@CONTACTID = CONTACTID,
@QUANTITY = QUANTITY,
@PURPOSEID = PURPOSEID,
@FACILITYID = FACILITYID,
@CAMPAIGNID = CAMPAIGNID,
@MINIMUMAMOUNT = MINIMUMAMOUNT,
@SITEID = SITEID,
@SITEREQUIRED = dbo.UFN_SITEREQUIREDFORUSER(@CURRENTAPPUSERID),
@TSLONG = TSLONG,
@BASECURRENCYID = BASECURRENCYID
from
dbo.NAMINGOPPORTUNITY
where
@ID = NAMINGOPPORTUNITY.ID
end