USP_DATAFORMTEMPLATE_ADD_PROSPECTRESEARCHREQUESTAPPUSERPERMISSION
The save procedure used by the add dataform template "Prospect Research Request App User Permission Add Form".
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | INOUT | The output parameter indicating the ID of the record added. |
@CHANGEAGENTID | uniqueidentifier | IN | Input parameter indicating the ID of the change agent invoking the procedure. |
@APPUSERID | uniqueidentifier | IN | Application User |
@CANVIEWREQUESTSASSIGNEDTOOTHERS | bit | IN | Can view requests assigned to others |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_ADD_PROSPECTRESEARCHREQUESTAPPUSERPERMISSION (
@ID uniqueidentifier = null output,
@CHANGEAGENTID uniqueidentifier,
@APPUSERID uniqueidentifier,
@CANVIEWREQUESTSASSIGNEDTOOTHERS bit = 0
) as
set nocount on;
if @CHANGEAGENTID is null
exec dbo.USP_CHANGEAGENT_GETORCREATECHANGEAGENT @CHANGEAGENTID output;
declare @CURRENTDATE datetime;
set @CURRENTDATE = getdate();
begin try
set @ID = @APPUSERID;
insert into dbo.PROSPECTRESEARCHREQUESTAPPUSERPERMISSION (
[ID],
[CANVIEWREQUESTSASSIGNEDTOOTHERS],
[ADDEDBYID],
[CHANGEDBYID],
[DATEADDED],
[DATECHANGED]
)
values (
@ID,
@CANVIEWREQUESTSASSIGNEDTOOTHERS,
@CHANGEAGENTID,
@CHANGEAGENTID,
@CURRENTDATE,
@CURRENTDATE
);
end try
begin catch
exec dbo.USP_RAISE_ERROR;
return 1;
end catch
return 0