USP_DATAFORMTEMPLATE_ADD_ADDPROSPECTPLANSPROCESS_PRELOAD
The load procedure used by the edit dataform template "Add Prospect Plans Process Add Form"
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@RECORDTYPEID | uniqueidentifier | INOUT | |
@PROSPECTPLANCURRENCYSETID | uniqueidentifier | INOUT | Plan base currency |
@OPPORTUNITYTRANSACTIONCURRENCYID | uniqueidentifier | INOUT | Opportunity transaction currency |
@CURRENTAPPUSERID | uniqueidentifier | IN | Input parameter indicating the ID of the current user. |
@SITES | xml | INOUT | Sites |
@SITEREQUIRED | bit | INOUT | Site required |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_ADD_ADDPROSPECTPLANSPROCESS_PRELOAD
(
@RECORDTYPEID uniqueidentifier = null output,
@PROSPECTPLANCURRENCYSETID uniqueidentifier = null output,
@OPPORTUNITYTRANSACTIONCURRENCYID uniqueidentifier = null output,
@CURRENTAPPUSERID uniqueidentifier,
@SITES xml = null output,
@SITEREQUIRED bit = null output
)
as
set nocount on;
select @RECORDTYPEID = ID
from dbo.RECORDTYPE
where NAME = 'Constituent';
set @SITEREQUIRED = dbo.UFN_SITEREQUIREDFORUSER(@CURRENTAPPUSERID);
set @PROSPECTPLANCURRENCYSETID = dbo.UFN_CURRENCYSET_GETAPPUSERCURRENCYSET(@CURRENTAPPUSERID);
set @OPPORTUNITYTRANSACTIONCURRENCYID = dbo.UFN_APPUSER_GETBASECURRENCY(@CURRENTAPPUSERID)
declare @DEFAULTSITEID uniqueidentifier
set @DEFAULTSITEID = dbo.UFN_APPUSER_DEFAULTSITEFORUSER(@CURRENTAPPUSERID)
if @DEFAULTSITEID is not null
set @SITES = (SELECT newid() as ID, @DEFAULTSITEID as SITEID for xml raw('ITEM'),type,elements,root('SITES'),BINARY BASE64)
return 0;