USP_DATAFORMTEMPLATE_EDITLOAD_OPPORTUNITYREASONS
The load procedure used by the edit dataform template "Sponsorship Opportunity Pending Reasons 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. |
@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. |
@REASONLIST | xml | INOUT | Reason |
@REASONTYPE | tinyint | INOUT | REASONTYPE |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_OPPORTUNITYREASONS(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@TSLONG bigint = 0 output,
@REASONLIST xml = null output,
@REASONTYPE tinyint = null output)
as
set nocount on;
set @DATALOADED = 1
set @TSLONG = 0
select @REASONTYPE = case when SPONSORSHIPOPPORTUNITYCHILD.ID is not null then 0 else 10 end,
@TSLONG = SPONSORSHIPOPPORTUNITY.TSLONG
from
dbo.SPONSORSHIPOPPORTUNITY
left outer join dbo.SPONSORSHIPOPPORTUNITYCHILD on SPONSORSHIPOPPORTUNITYCHILD.ID = SPONSORSHIPOPPORTUNITY.ID
left outer join dbo.SPONSORSHIPOPPORTUNITYPROJECT on SPONSORSHIPOPPORTUNITYPROJECT.ID = SPONSORSHIPOPPORTUNITY.ID
where
SPONSORSHIPOPPORTUNITY.ID = @ID
select @REASONLIST = dbo.UFN_SPONOSRSHIPOPPORTUNITY_REASONS_TOITEMLISTXML(@ID)
return 0;