USP_DATAFORMTEMPLATE_ADD_PRELOAD_BENEFITUNIT

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

Parameters

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

Definition

Copy


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

                        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;