USP_DATAFORMTEMPLATE_VIEW_CONSTITUENTISORGANIZATION

The load procedure used by the view dataform template "Constituent Is Organization View Form"

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN The input ID parameter used to load the fields defined on the form.
@DATALOADED bit INOUT Output parameter indicating whether or not data was actually loaded.
@ISORGANIZATION bit INOUT Is organization

Definition

Copy


                CREATE procedure dbo.USP_DATAFORMTEMPLATE_VIEW_CONSTITUENTISORGANIZATION
                (
                    @ID uniqueidentifier,
                    @DATALOADED bit = 0 output,
                    @ISORGANIZATION bit = null output
                )
                as
                    /*
                       This dataform is currently being used by the tribute add/edit forms. If a form contains a constituent search
                       and the user adds a new org or individual from the search, we need to be able to determine if the constituent
                       is an organization. Currently, this requires making a web service call to this form.
                    */
                    set nocount on;
                    set @DATALOADED = 0;

                    select @DATALOADED = 1, @ISORGANIZATION = ISORGANIZATION from dbo.CONSTITUENT where ID = @ID;

                    return 0;