USP_DATAFORMTEMPLATE_ADD_PRELOAD_BENEFIT

The load procedure used by the edit dataform template "Benefit Add Form"

Parameters

Parameter Parameter Type Mode Description
@CURRENTAPPUSERID uniqueidentifier IN Input parameter indicating the ID of the current user.
@SITEREQUIRED bit INOUT Site required
@SITES xml INOUT Sites
@BASECURRENCYID uniqueidentifier INOUT Base currency ID

Definition

Copy


                    CREATE procedure dbo.USP_DATAFORMTEMPLATE_ADD_PRELOAD_BENEFIT
                    (
                        @CURRENTAPPUSERID uniqueidentifier,
                        @SITEREQUIRED bit = null output,
                        @SITES xml = null output,
                        @BASECURRENCYID uniqueidentifier = null output
                    )
                    as
                        set nocount on;

                        set @SITEREQUIRED = dbo.UFN_SITEREQUIREDFORUSER(@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);

                        set @BASECURRENCYID = dbo.UFN_APPUSER_GETBASECURRENCY(@CURRENTAPPUSERID);

                        return 0;