USP_DATAFORMTEMPLATE_EDITLOAD_SEGMENTMAPPINGS
The load procedure used by the edit dataform template "Account Segment Mappings Edit 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. |
@TSLONG | bigint | INOUT | Output parameter indicating the TSLONG value of the record being edited. This is used to manage multi-user concurrency issues when multiple users access the same record. |
@PDACCOUNTSEGMENTMAP | xml | INOUT | PD Segment Mappings |
@USEDROPDOWN | tinyint | INOUT |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_SEGMENTMAPPINGS(
@ID uniqueidentifier
,@DATALOADED bit = 0 output
,@TSLONG bigint = 0 output
,@PDACCOUNTSEGMENTMAP xml = null output
,@USEDROPDOWN tinyint = null output
)
as
set nocount on;
set @DATALOADED = 0;
set @TSLONG = 0;
select
@DATALOADED = 1
,@TSLONG = TSLONG
,@PDACCOUNTSEGMENTMAP = dbo.UFN_PDACCOUNTSEGMENTMAP_TOITEMLISTXML(ID)
from dbo.PDACCOUNTSTRUCTURE
where ID = @ID
;
--deprecating the @USEDROPDOWN and always setting it to false since it was never used
--declare @ITEMCOUNT int;
--select @ITEMCOUNT = COUNT(*) from PDACCOUNTSEGMENTMAPPINGVIEW where PDACCOUNTSTRUCTUREID = @ID;
--if @ITEMCOUNT<50
-- set @USEDROPDOWN = 1;
--else
set @USEDROPDOWN = 0;
return 0;