Table "Sales Comment Line"
Stores comment lines associated with sales documents and posted sales documents.
Properties
| Name | Value |
|---|---|
| Caption | Sales Comment Line |
| DrillDownPageID | Page Microsoft.Sales.Comment."Sales Comment List" |
| LookupPageID | Page Microsoft.Sales.Comment."Sales Comment List" |
| DataClassification | CustomerContent |
Fields
| Name | Type | Description |
|---|---|---|
| "Document Type" | Enum Microsoft.Sales.Comment."Sales Comment Document Type" | Specifies the type of sales document this comment is associated with. |
| "No." | Code[20] | Specifies the document number that this comment belongs to. |
| "Line No." | Integer | Specifies the unique sequence number for this comment line within the document. |
| Date | Date | Specifies the date when the comment was created. |
| Code | Code[10] | Specifies a code to categorize or classify the comment. |
| Comment | Text[80] | Contains the actual text of the comment. |
| "Document Line No." | Integer | Specifies the line number of the sales document line this comment is attached to. A value of zero indicates a header-level comment. |
| SystemId | Guid | |
| SystemCreatedAt | DateTime | |
| SystemCreatedBy | Guid | |
| SystemModifiedAt | DateTime | |
| SystemModifiedBy | Guid | |
| SystemCreatedByUserName | Text[50] | |
| SystemCreatedByFullName | Text[80] | |
| SystemModifiedByUserName | Text[50] | |
| SystemModifiedByFullName | Text[80] | |
| SystemRowVersion | BigInteger |
Methods
SetUpNewLine
Initializes default values for a new sales comment line, setting the date to work date if no other comment exists for the current date.
procedure SetUpNewLine()
CopyComments
Copies all comment lines from one sales document to another.
procedure CopyComments(FromDocumentType: Integer; ToDocumentType: Integer; FromNumber: Code[20]; ToNumber: Code[20])
Parameters
| Name | Type | Description |
|---|---|---|
| FromDocumentType | Integer |
Specifies the source document type. |
| ToDocumentType | Integer |
Specifies the target document type. |
| FromNumber | Code[20] |
Specifies the source document number. |
| ToNumber | Code[20] |
Specifies the target document number. |
CopyLineComments
Copies comment lines associated with a specific document line to another document line.
procedure CopyLineComments(FromDocumentType: Integer; ToDocumentType: Integer; FromNumber: Code[20]; ToNumber: Code[20]; FromDocumentLineNo: Integer; ToDocumentLineNo: Integer)
Parameters
| Name | Type | Description |
|---|---|---|
| FromDocumentType | Integer |
Specifies the source document type. |
| ToDocumentType | Integer |
Specifies the target document type. |
| FromNumber | Code[20] |
Specifies the source document number. |
| ToNumber | Code[20] |
Specifies the target document number. |
| FromDocumentLineNo | Integer |
Specifies the source document line number. |
| ToDocumentLineNo | Integer |
Specifies the target document line number. |
CopyLineCommentsFromSalesLines
Copies line-level comments from multiple sales lines to header-level comments on the target document.
procedure CopyLineCommentsFromSalesLines(FromDocumentType: Integer; ToDocumentType: Integer; FromNumber: Code[20]; ToNumber: Code[20]; var TempSalesLineSource: Record "Sales Line" temporary)
Parameters
| Name | Type | Description |
|---|---|---|
| FromDocumentType | Integer |
Specifies the source document type. |
| ToDocumentType | Integer |
Specifies the target document type. |
| FromNumber | Code[20] |
Specifies the source document number. |
| ToNumber | Code[20] |
Specifies the target document number. |
| TempSalesLineSource | Table Microsoft.Sales.Document."Sales Line" |
Specifies the temporary sales lines whose comments should be copied. |
CopyHeaderComments
Copies header-level comments from one sales document to another.
procedure CopyHeaderComments(FromDocumentType: Integer; ToDocumentType: Integer; FromNumber: Code[20]; ToNumber: Code[20])
Parameters
| Name | Type | Description |
|---|---|---|
| FromDocumentType | Integer |
Specifies the source document type. |
| ToDocumentType | Integer |
Specifies the target document type. |
| FromNumber | Code[20] |
Specifies the source document number. |
| ToNumber | Code[20] |
Specifies the target document number. |
DeleteComments
Deletes all comment lines associated with the specified sales document.
procedure DeleteComments(DocType: Option; DocNo: Code[20])
Parameters
| Name | Type | Description |
|---|---|---|
| DocType | Option |
Specifies the document type of the comments to delete. |
| DocNo | Code[20] |
Specifies the document number of the comments to delete. |
ShowComments
Opens the Sales Comment Sheet page to display comments for the specified document or document line.
procedure ShowComments(DocType: Option; DocNo: Code[20]; DocLineNo: Integer)
Parameters
| Name | Type | Description |
|---|---|---|
| DocType | Option |
Specifies the document type to filter comments. |
| DocNo | Code[20] |
Specifies the document number to filter comments. |
| DocLineNo | Integer |
Specifies the document line number to filter comments. Use zero for header-level comments. |
Events
OnAfterSetUpNewLine
Raises an event after initializing default values for a new sales comment line.
[IntegrationEvent(False,False)]
local procedure OnAfterSetUpNewLine(var SalesCommentLineRec: Record "Sales Comment Line"; var SalesCommentLineFilter: Record "Sales Comment Line")
Parameters
| Name | Type | Description |
|---|---|---|
| SalesCommentLineRec | Table Microsoft.Sales.Comment."Sales Comment Line" |
Specifies the sales comment line record being initialized. |
| SalesCommentLineFilter | Table Microsoft.Sales.Comment."Sales Comment Line" |
Specifies the sales comment line record used for filtering. |
OnBeforeCopyComments
Raises an event before copying comment lines from one document to another.
[IntegrationEvent(False,False)]
local procedure OnBeforeCopyComments(var SalesCommentLine: Record "Sales Comment Line"; ToDocumentType: Integer; var IsHandled: Boolean; FromDocumentType: Integer; FromNumber: Code[20]; ToNumber: Code[20])
Parameters
| Name | Type | Description |
|---|---|---|
| SalesCommentLine | Table Microsoft.Sales.Comment."Sales Comment Line" |
Specifies the sales comment line record. |
| ToDocumentType | Integer |
Specifies the target document type. |
| IsHandled | Boolean |
Set to true to skip the default copying logic. |
| FromDocumentType | Integer |
Specifies the source document type. |
| FromNumber | Code[20] |
Specifies the source document number. |
| ToNumber | Code[20] |
Specifies the target document number. |
OnBeforeCopyLineComments
Raises an event before copying line-specific comment lines from one document line to another.
[IntegrationEvent(False,False)]
local procedure OnBeforeCopyLineComments(var SalesCommentLine: Record "Sales Comment Line"; var IsHandled: Boolean; FromDocumentType: Integer; ToDocumentType: Integer; FromNumber: Code[20]; ToNumber: Code[20]; FromDocumentLineNo: Integer; ToDocumentLine: Integer)
Parameters
| Name | Type | Description |
|---|---|---|
| SalesCommentLine | Table Microsoft.Sales.Comment."Sales Comment Line" |
Specifies the target sales comment line record. |
| IsHandled | Boolean |
Set to true to skip the default copying logic. |
| FromDocumentType | Integer |
Specifies the source document type. |
| ToDocumentType | Integer |
Specifies the target document type. |
| FromNumber | Code[20] |
Specifies the source document number. |
| ToNumber | Code[20] |
Specifies the target document number. |
| FromDocumentLineNo | Integer |
Specifies the source document line number. |
| ToDocumentLine | Integer |
Specifies the target document line number. |
OnBeforeCopyLineCommentsFromSalesLines
Raises an event before copying line-level comments from sales lines to header-level comments on the target document.
[IntegrationEvent(False,False)]
local procedure OnBeforeCopyLineCommentsFromSalesLines(var SalesCommentLine: Record "Sales Comment Line"; var IsHandled: Boolean; FromDocumentType: Integer; ToDocumentType: Integer; FromNumber: Code[20]; ToNumber: Code[20]; var TempSalesLineSource: Record "Sales Line" temporary)
Parameters
| Name | Type | Description |
|---|---|---|
| SalesCommentLine | Table Microsoft.Sales.Comment."Sales Comment Line" |
Specifies the target sales comment line record. |
| IsHandled | Boolean |
Set to true to skip the default copying logic. |
| FromDocumentType | Integer |
Specifies the source document type. |
| ToDocumentType | Integer |
Specifies the target document type. |
| FromNumber | Code[20] |
Specifies the source document number. |
| ToNumber | Code[20] |
Specifies the target document number. |
| TempSalesLineSource | Table Microsoft.Sales.Document."Sales Line" |
Specifies the temporary sales lines whose comments should be copied. |
OnBeforeCopyHeaderComments
Raises an event before copying header-level comments from one document to another.
[IntegrationEvent(False,False)]
local procedure OnBeforeCopyHeaderComments(var SalesCommentLine: Record "Sales Comment Line"; var IsHandled: Boolean; FromDocumentType: Integer; ToDocumentType: Integer; FromNumber: Code[20]; ToNumber: Code[20])
Parameters
| Name | Type | Description |
|---|---|---|
| SalesCommentLine | Table Microsoft.Sales.Comment."Sales Comment Line" |
Specifies the target sales comment line record. |
| IsHandled | Boolean |
Set to true to skip the default copying logic. |
| FromDocumentType | Integer |
Specifies the source document type. |
| ToDocumentType | Integer |
Specifies the target document type. |
| FromNumber | Code[20] |
Specifies the source document number. |
| ToNumber | Code[20] |
Specifies the target document number. |
OnBeforeCopyCommentsOnBeforeInsert
Raises an event before inserting a copied comment line, allowing modification of the new comment before insertion.
[IntegrationEvent(False,False)]
local procedure OnBeforeCopyCommentsOnBeforeInsert(var NewSalesCommentLine: Record "Sales Comment Line"; OldSalesCommentLine: Record "Sales Comment Line")
Parameters
| Name | Type | Description |
|---|---|---|
| NewSalesCommentLine | Table Microsoft.Sales.Comment."Sales Comment Line" |
Specifies the new sales comment line to be inserted. |
| OldSalesCommentLine | Table Microsoft.Sales.Comment."Sales Comment Line" |
Specifies the original sales comment line being copied. |
OnBeforeSetUpNewLine
Raises an event before initializing default values for a new sales comment line.
[IntegrationEvent(False,False)]
local procedure OnBeforeSetUpNewLine(var SalesCommentLineRec: Record "Sales Comment Line"; var SalesCommentLineFilter: Record "Sales Comment Line")
Parameters
| Name | Type | Description |
|---|---|---|
| SalesCommentLineRec | Table Microsoft.Sales.Comment."Sales Comment Line" |
Specifies the sales comment line record being initialized. |
| SalesCommentLineFilter | Table Microsoft.Sales.Comment."Sales Comment Line" |
Specifies the sales comment line record used for filtering. |