USP_DATAFORMTEMPLATE_VIEW_EXCHANGECALENDARSYNC
The load procedure used by the view dataform template "Exchange Calendar Synchronization View 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. |
@NAME | nvarchar(255) | INOUT | Name |
@CREATEFOR | nvarchar(255) | INOUT | Create for |
@ADDLINKTO | nvarchar(255) | INOUT | Add link to |
@REMINDER | nvarchar(100) | INOUT | Reminder |
@DATERANGE | nvarchar(100) | INOUT | Date range |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_VIEW_EXCHANGECALENDARSYNC
(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@NAME nvarchar(255) = null output,
@CREATEFOR nvarchar(255) = null output,
@ADDLINKTO nvarchar(255) = null output,
@REMINDER nvarchar(100) = null output,
@DATERANGE nvarchar(100) = null output
)
as
set nocount on;
set @DATALOADED = 0;
declare @INCLUDEPENDINGINTERACTIONS bit;
declare @INCLUDEPROSPECTPLANSTEPS bit;
declare @INCLUDEPENDINGSTEWARDSHIPSTEPS bit;
select
@DATALOADED = 1,
@NAME = NAME,
@DATERANGE = (case CREATEITEMOPTIONCODE when 1 then 'All future items' when 0 then EXPECTEDDATEINTERVAL end),
@ADDLINKTO = dbo.UFN_PAGEDEFINITION_GETDESCRIPTION(PAGEDEFINITIONCATALOGID),
@REMINDER = (case DEFAULTREMINDERAMOUNT when -1 then 'None' when 0 then '0 minutes' when 5 then '5 minutes' when 10 then '10 minutes' when 15 then '15 minutes' when 30 then '30 minutes' when 60 then '1 hour' when 120 then '2 hours' when 180 then '3 hours' when 240 then '4 hours' when 300 then '5 hours' when 360 then '6 hours' when 420 then '7 hours' when 480 then '8 hours' when 540 then '9 hours' when 600 then '10 hours' when 660 then '11 hours' when 720 then '0.5 days' when 1080 then '18 hours' when 1440 then '1 day' when 2880 then '2 days' when 4320 then '3 days' when 5760 then '4 days' when 10080 then '1 week' when 20160 then '2 weeks' end),
@INCLUDEPENDINGINTERACTIONS = INCLUDEPENDINGINTERACTIONS,
@INCLUDEPROSPECTPLANSTEPS = INCLUDEPROSPECTPLANSTEPS,
@INCLUDEPENDINGSTEWARDSHIPSTEPS = INCLUDEPENDINGSTEWARDSHIPSTEPS
from
dbo.EXCHANGECALENDARSYNC
where
ID = @ID;
if @INCLUDEPENDINGINTERACTIONS = 1
set @CREATEFOR = 'Pending constituent interactions, ';
if @INCLUDEPROSPECTPLANSTEPS = 1
set @CREATEFOR = coalesce(@CREATEFOR, '') + 'Prospect plan steps, ';
if @INCLUDEPENDINGSTEWARDSHIPSTEPS = 1
set @CREATEFOR = coalesce(@CREATEFOR, '') + 'Pending stewardship steps'
else if len(@CREATEFOR) > 2
set @CREATEFOR = left(@CREATEFOR, len(@CREATEFOR) - 1);
return 0;