USP_DATAFORMTEMPLATE_EDITLOAD_ORGANIZATIONCURRENCY
The load procedure used by the edit dataform template "Organization Currency Edit Data Form"
Parameters
| Parameter | Parameter Type | Mode | Description |
|---|---|---|---|
| @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. |
| @CURRENCYID | uniqueidentifier | INOUT | Currency |
| @DEFAULTCURRENCYSETID | uniqueidentifier | INOUT | Default currency set |
Definition
Copy
create procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_ORGANIZATIONCURRENCY(
@DATALOADED bit = 0 output,
@TSLONG bigint = 0 output,
@CURRENCYID uniqueidentifier = null output,
@DEFAULTCURRENCYSETID uniqueidentifier = null output
)
as
set nocount on;
set @TSLONG = 0; --Ignore concurrency, we're just setting a bit so the last save wins
set @DATALOADED = 1; --Always load the form even if there is no current organization currency
select
@CURRENCYID = CURRENCY.ID
from
dbo.CURRENCY
where
CURRENCY.ISORGANIZATIONCURRENCY = 1;
select
@DEFAULTCURRENCYSETID = CURRENCYSET.ID
from
dbo.CURRENCYSET
where
CURRENCYSET.ISAPPUSERDEFAULT = 1;
return 0;