USP_DATAFORMTEMPLATE_VIEW_SALESORDERTEXTNOTE
The load procedure used by the view dataform template "Sales Order Note View 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. |
@DATEENTERED | datetime | INOUT | Date |
@TITLE | nvarchar(50) | INOUT | Title |
@TEXTNOTE | nvarchar(max) | INOUT | Note |
@AUTHOR | nvarchar(154) | INOUT | Author |
@NOTETYPE | nvarchar(100) | INOUT | Type |
@SALESORDERITEM | nvarchar(100) | INOUT | Regarding |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_VIEW_SALESORDERTEXTNOTE (
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@DATEENTERED datetime = null output,
@TITLE nvarchar(50) = null output,
@TEXTNOTE nvarchar(max) = null output,
@AUTHOR nvarchar(154) = null output,
@NOTETYPE nvarchar(100) = null output,
@SALESORDERITEM nvarchar(100) = null output
) as
set nocount on;
set @DATALOADED = 0;
select
@DATALOADED = 1,
@DATEENTERED = SALESORDERNOTE.DATEENTERED,
@TITLE = SALESORDERNOTE.TITLE,
@TEXTNOTE = SALESORDERNOTE.HTMLNOTE,
@AUTHOR = CONSTITUENT.NAME,
@NOTETYPE = SALESORDERNOTETYPECODE.DESCRIPTION,
@SALESORDERITEM = dbo.UFN_TRANSLATIONFUNCTION_SALESORDERITEM_WITHTOTAL(SALESORDERNOTE.SALESORDERITEMID)
from
dbo.SALESORDERNOTE
inner join
dbo.SALESORDERNOTETYPECODE
on
dbo.SALESORDERNOTETYPECODE.ID = dbo.SALESORDERNOTE.SALESORDERNOTETYPECODEID
left join
dbo.CONSTITUENT
on
dbo.CONSTITUENT.ID = dbo.SALESORDERNOTE.AUTHORID
where
SALESORDERNOTE.ID = @ID;
return 0;