USP_DESIGNATION_CMS_ADD
Executes the "Designation Donation Page: Publish" record operation.
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN | Input parameter indicating the ID of the record being updated. |
@CHANGEAGENTID | uniqueidentifier | IN | Input parameter indicating the ID of the change agent invoking the update. |
Definition
Copy
CREATE procedure dbo.USP_DESIGNATION_CMS_ADD
(
@ID uniqueidentifier,
@CHANGEAGENTID uniqueidentifier
)
as begin
declare @VANITYNAME nvarchar(512)
select @VANITYNAME = VANITYNAME from dbo.DESIGNATION where ID = @ID
declare @CMSID int
select @CMSID = ID from dbo.[BBNCDESIGNATIONIDMAP] where [DESIGNATIONID] = @ID
declare @PRIMARYCONTENTID int
select @PRIMARYCONTENTID = PRIMARYCONTENTID from dbo.MICROSITEPAGE where OBJECTID = @ID
declare @CLIENTDONATIONSID int
select @CLIENTDONATIONSID = ID from [dbo].[ClientDonations] where ContentID = @PRIMARYCONTENTID
/*
INSERT INTO [dbo].[DonationDesignations](
[ClientDonationsID]
,[BackOfficeID]
,[Name]
,IsDefault
,[BackOfficeIDGUID]
)
VALUES(
@CLIENTDONATIONSID
,@CMSID
,LEFT(@VANITYNAME, 50)
,1
,@ID
)
*/
update [dbo].[DonationDesignations]
set [BackOfficeID] = @CMSID
,[Name] = LEFT(@VANITYNAME, 50)
,[BackOfficeIDGUID] = @ID
where ([ClientDonationsID] = @CLIENTDONATIONSID)
and ([BackOfficeID] = -1)
return 0;
end