USP_DATAFORMTEMPLATE_EDITLOAD_FENXTSYNCPROCESS
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN | |
@DATALOADED | bit | INOUT | |
@TSLONG | bigint | INOUT | |
@NAME | nvarchar(100) | INOUT | |
@DESCRIPTION | nvarchar(255) | INOUT | |
@FENXTINTEGRATIONID | uniqueidentifier | INOUT | |
@SYNCFISCALYEARS | bit | INOUT | |
@SYNCPROJECT_DESIGNATION | bit | INOUT | |
@SYNCACCOUNTS | bit | INOUT | |
@PURPOSETYPECODE | tinyint | INOUT | |
@PURPOSETYPEID | uniqueidentifier | INOUT | |
@FYFENXTINTEGRATIONID | uniqueidentifier | INOUT |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_FENXTSYNCPROCESS
(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@TSLONG bigint = 0 output,
@NAME nvarchar(100) = null output,
@DESCRIPTION nvarchar(255) = null output,
@FENXTINTEGRATIONID uniqueidentifier = null output,
@SYNCFISCALYEARS bit = null output,
@SYNCPROJECT_DESIGNATION bit = null output,
@SYNCACCOUNTS bit = null output,
@PURPOSETYPECODE tinyint = null output,
@PURPOSETYPEID uniqueidentifier = null output,
@FYFENXTINTEGRATIONID uniqueidentifier = null output
)
as
set nocount on;
-- be sure to set these, in case the select returns no rows
set @DATALOADED = 0;
set @TSLONG = 0;
-- populate the output parameters, which correspond to fields on the form. Note that
-- we set @DATALOADED = 1 to indicate that the load was successful. Otherwise, the system
-- will display a "no data loaded" message. Also note that we fetch the TSLONG so that concurrency can be considered.
select
@DATALOADED = 1,
@TSLONG = TSLONG,
@NAME = NAME,
@DESCRIPTION = DESCRIPTION,
@FENXTINTEGRATIONID = FENXTINTEGRATIONID,
@SYNCFISCALYEARS = SYNCFISCALYEARS,
@SYNCPROJECT_DESIGNATION = SYNCPROJECT_DESIGNATION,
@SYNCACCOUNTS = SYNCACCOUNTS,
@PURPOSETYPECODE = case SYNCPROJECT_DESIGNATION when 1 then PURPOSETYPECODE else 0 end,
@PURPOSETYPEID = case SYNCPROJECT_DESIGNATION when 1 then case PURPOSETYPECODE when 1 then PURPOSETYPEID else null end else null end
from dbo.FENXTSYNCPROCESS
where ID = @ID;
select @FYFENXTINTEGRATIONID = ID
from dbo.FENXTINTEGRATION
where SYNCFISCALYEAR = 1;
return 0;