USP_DATAFORMTEMPLATE_VIEW_GLDISTRIBUTIONINFO
The load procedure used by the view dataform template "Revenue GL Distribution Information"
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. |
@ACCOUNTSYSTEM | nvarchar(50) | INOUT | Account system |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_VIEW_GLDISTRIBUTIONINFO
(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@ACCOUNTSYSTEM nvarchar(50) = null output
)
as
set nocount on;
set @DATALOADED = 0;
select @DATALOADED = 1,
@ACCOUNTSYSTEM = s.NAME
from PDACCOUNTSYSTEM as s
inner join PDACCOUNTSYSTEMFORREVENUE as r on r.PDACCOUNTSYSTEMID = s.ID
where r.ID = @ID
-- If no account system linked, use default system.
if @ACCOUNTSYSTEM is null
select @DATALOADED = 1,
@ACCOUNTSYSTEM = NAME
from PDACCOUNTSYSTEM where ID = '4B121C2C-CCE6-440D-894C-EA0DEF80D50B'
return 0;