USP_DATAFORMTEMPLATE_EDITLOAD_GLACCOUNT
The load procedure used by the edit dataform template "Account 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. |
@ACCOUNTNUMBER | nvarchar(100) | INOUT | Account number |
@ACCOUNTDESCRIPTION | nvarchar(100) | INOUT | Description |
@CATEGORY | nvarchar(10) | INOUT | Category |
@ACCTFORMAT | nvarchar(101) | INOUT | Account Format |
@EXISTINGTRANSACTIONS | bit | INOUT |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_GLACCOUNT
(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@TSLONG bigint = 0 output,
@ACCOUNTNUMBER nvarchar(100) = null output,
@ACCOUNTDESCRIPTION nvarchar(100) = null output,
@CATEGORY nvarchar(10) = null output,
@ACCTFORMAT nvarchar(101) = null output,
@EXISTINGTRANSACTIONS bit = null output
)
as
set nocount on;
set @DATALOADED = 0;
set @TSLONG = 0;
select
@DATALOADED = 1,
@TSLONG = TSLONG,
@ACCOUNTNUMBER = ACCOUNTNUMBER,
@ACCOUNTDESCRIPTION = ACCOUNTDESCRIPTION,
@CATEGORY = null -- PDCATEGORYDEFINITION.CATEGORYNAME
from
dbo.GLACCOUNT
--inner join dbo.PDCATEGORYDEFINITION on PDCATEGORYDEFINITION.ID = PDCATEGORYDEFINITIONID
where
ID = @ID;
select @ACCTFORMAT = dbo.UFN_PDACCOUNTSTRUCTURE_DEFINEMASK()
if exists (select * from dbo.GLTRANSACTION where GLACCOUNTID is not null)
set @EXISTINGTRANSACTIONS = 1
else
set @EXISTINGTRANSACTIONS = 0
return 0;