USP_DATAFORMTEMPLATE_EDIT_PLEDGEREMINDERPROCESSPREPROCESS_1_1
The save procedure used by the edit dataform template "Pledge Reminder Preprocess Edit Form 1.1".
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN | The input ID parameter indicating the ID of the record being edited. |
@CHANGEAGENTID | uniqueidentifier | IN | Input parameter indicating the ID of the change agent invoking the procedure. |
@CREATEOUTPUTIDSET | bit | IN | Create selection from results |
@OUTPUTIDSETRECORDTYPEID | uniqueidentifier | IN | Selection type |
@OUTPUTIDSETNAME | nvarchar(100) | IN | Selection name |
@OVERWRITEOUTPUTIDSET | bit | IN | Overwrite existing Selection |
@DATETYPECODE | tinyint | IN | Calculate amounts as of |
@DATE | datetime | IN | Process date |
@MARKREMINDERSSENT | bit | IN | Mark reminders sent when process completes |
@SENTDATETYPECODE | tinyint | IN | Sent date |
@SENTDATE | datetime | IN | Sent date |
@EXCLUDEMAIL | bit | IN | Exclude mail |
@EXCLUDEPHONE | bit | IN | Exclude phone |
@EXCLUDEEMAIL | bit | IN | Exclude email |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDIT_PLEDGEREMINDERPROCESSPREPROCESS_1_1
(
@ID uniqueidentifier,
@CHANGEAGENTID uniqueidentifier = null,
@CREATEOUTPUTIDSET bit,
@OUTPUTIDSETRECORDTYPEID uniqueidentifier,
@OUTPUTIDSETNAME nvarchar(100),
@OVERWRITEOUTPUTIDSET bit,
@DATETYPECODE tinyint,
@DATE datetime,
@MARKREMINDERSSENT bit,
@SENTDATETYPECODE tinyint,
@SENTDATE datetime,
@EXCLUDEMAIL bit,
@EXCLUDEPHONE bit,
@EXCLUDEEMAIL bit
)
as
set nocount on;
declare @CURRENTDATE datetime;
set @CURRENTDATE = getdate();
begin try
if @CHANGEAGENTID is null
exec dbo.USP_CHANGEAGENT_GETORCREATECHANGEAGENT @CHANGEAGENTID output;
update
dbo.PLEDGEREMINDERPROCESS
set
CREATEOUTPUTIDSET = @CREATEOUTPUTIDSET,
OUTPUTIDSETRECORDTYPEID = @OUTPUTIDSETRECORDTYPEID,
OUTPUTIDSETNAME = @OUTPUTIDSETNAME,
OVERWRITEOUTPUTIDSET = @OVERWRITEOUTPUTIDSET,
DATETYPECODE = @DATETYPECODE,
DATE = @DATE,
MARKREMINDERSSENT = @MARKREMINDERSSENT,
SENTDATETYPECODE = @SENTDATETYPECODE,
SENTDATE = @SENTDATE,
CHANGEDBYID = @CHANGEAGENTID,
DATECHANGED = @CURRENTDATE,
EXCLUDEMAIL = @EXCLUDEMAIL,
EXCLUDEPHONE = @EXCLUDEPHONE,
EXCLUDEEMAIL = @EXCLUDEEMAIL
where
ID = @ID;
end try
begin catch
exec dbo.USP_RAISE_ERROR;
return 1;
end catch
return 0;