Codeunit "Format Document"

ID 368
Namespace: Microsoft.Utilities

Methods

GetRecordFiltersWithCaptions

procedure GetRecordFiltersWithCaptions(RecVariant: Variant): Text

Parameters

Name Type Description
RecVariant Variant

Returns

Type Description
Text

GetCOPYText

procedure GetCOPYText(): Text[30]

Returns

Type Description
Text[30]

ParseComment

procedure ParseComment(Comment: Text[80], var Description: Text[100], var Description2: Text[100])

Parameters

Name Type Description
Comment Text[80]
Description Text[100]
Description2 Text[100]

SetTotalLabels

procedure SetTotalLabels(CurrencyCode: Code[10], var TotalText: Text[50], var TotalInclVATText: Text[50], var TotalExclVATText: Text[50])

Parameters

Name Type Description
CurrencyCode Code[10]
TotalText Text[50]
TotalInclVATText Text[50]
TotalExclVATText Text[50]

SetLogoPosition

procedure SetLogoPosition(LogoPosition: Option, var CompanyInfo1: Record "Company Information", var CompanyInfo2: Record "Company Information", var CompanyInfo3: Record "Company Information")

Parameters

Name Type Description
LogoPosition Option
CompanyInfo1 Table Microsoft.Foundation.Company."Company Information"
CompanyInfo2 Table Microsoft.Foundation.Company."Company Information"
CompanyInfo3 Table Microsoft.Foundation.Company."Company Information"

SetPaymentMethod

procedure SetPaymentMethod(var PaymentMethod: Record "Payment Method", Code: Code[10], LanguageCode: Code[10])

Parameters

Name Type Description
PaymentMethod Table Microsoft.Bank.BankAccount."Payment Method"
Code Code[10]
LanguageCode Code[10]

SetPaymentTerms

procedure SetPaymentTerms(var PaymentTerms: Record "Payment Terms", Code: Code[10], LanguageCode: Code[10])

Parameters

Name Type Description
PaymentTerms Table Microsoft.Foundation.PaymentTerms."Payment Terms"
Code Code[10]
LanguageCode Code[10]

SetPurchaser

procedure SetPurchaser(var SalespersonPurchaser: Record "Salesperson/Purchaser", Code: Code[20], var PurchaserText: Text[50])

Parameters

Name Type Description
SalespersonPurchaser Table Microsoft.CRM.Team."Salesperson/Purchaser"
Code Code[20]
PurchaserText Text[50]

SetShipmentMethod

procedure SetShipmentMethod(var ShipmentMethod: Record "Shipment Method", Code: Code[10], LanguageCode: Code[10])

Parameters

Name Type Description
ShipmentMethod Table Microsoft.Foundation.Shipping."Shipment Method"
Code Code[10]
LanguageCode Code[10]

SetSalesPerson

procedure SetSalesPerson(var SalespersonPurchaser: Record "Salesperson/Purchaser", Code: Code[20], var SalesPersonText: Text[50])

Parameters

Name Type Description
SalespersonPurchaser Table Microsoft.CRM.Team."Salesperson/Purchaser"
Code Code[20]
SalesPersonText Text[50]

SetText

procedure SetText(Condition: Boolean, Caption: Text[80]): Text[80]

Parameters

Name Type Description
Condition Boolean
Caption Text[80]

Returns

Type Description
Text[80]

SetSalesInvoiceLine

procedure SetSalesInvoiceLine(var SalesInvoiceLine: Record "Sales Invoice Line", var FormattedQuantity: Text, var FormattedUnitPrice: Text, var FormattedVATPercentage: Text, var FormattedLineAmount: Text)

Parameters

Name Type Description
SalesInvoiceLine Table Microsoft.Sales.History."Sales Invoice Line"
FormattedQuantity Text
FormattedUnitPrice Text
FormattedVATPercentage Text
FormattedLineAmount Text

SetSalesLine

procedure SetSalesLine(var SalesLine: Record "Sales Line", var FormattedQuantity: Text, var FormattedUnitPrice: Text, var FormattedVATPercentage: Text, var FormattedLineAmount: Text)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"
FormattedQuantity Text
FormattedUnitPrice Text
FormattedVATPercentage Text
FormattedLineAmount Text

SetSalesCrMemoLine

procedure SetSalesCrMemoLine(var SalesCrMemoLine: Record "Sales Cr.Memo Line", var FormattedQuantity: Text, var FormattedUnitPrice: Text, var FormattedVATPercentage: Text, var FormattedLineAmount: Text)

Parameters

Name Type Description
SalesCrMemoLine Table Microsoft.Sales.History."Sales Cr.Memo Line"
FormattedQuantity Text
FormattedUnitPrice Text
FormattedVATPercentage Text
FormattedLineAmount Text

SetPurchaseLine

procedure SetPurchaseLine(var PurchaseLine: Record "Purchase Line", var FormattedQuantity: Text, var FormattedDirectUnitCost: Text, var FormattedVATPercentage: Text, var FormattedLineAmount: Text)

Parameters

Name Type Description
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"
FormattedQuantity Text
FormattedDirectUnitCost Text
FormattedVATPercentage Text
FormattedLineAmount Text

SetPurchaseLine

procedure SetPurchaseLine(var PurchaseLine: Record "Purchase Line", var FormattedQuantity: Text, var FormattedDirectUnitCost: Text)

Parameters

Name Type Description
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"
FormattedQuantity Text
FormattedDirectUnitCost Text

HideDocumentLine

procedure HideDocumentLine(HideLinesWithZeroQuantity: Boolean, RecordVariant: Variant, QuantityFieldId: Integer): Boolean

Parameters

Name Type Description
HideLinesWithZeroQuantity Boolean
RecordVariant Variant
QuantityFieldId Integer

Returns

Type Description
Boolean

IsLineWithZeroQuantity

procedure IsLineWithZeroQuantity(RecordVariant: Variant, QuantityFieldId: Integer): Boolean

Parameters

Name Type Description
RecordVariant Variant
QuantityFieldId Integer

Returns

Type Description
Boolean

Events

OnAfterSetSalesPurchaseLine

[IntegrationEvent(False,False)]
local procedure OnAfterSetSalesPurchaseLine(Quantity: Decimal, UnitPrice: Decimal, VATPercentage: Decimal, LineAmount: Decimal, CurrencyCode: Code[10], var FormattedQuantity: Text, var FormattedUnitPrice: Text, var FormattedVATPercentage: Text, var FormattedLineAmount: Text, CommentLine: Boolean)

Parameters

Name Type Description
Quantity Decimal
UnitPrice Decimal
VATPercentage Decimal
LineAmount Decimal
CurrencyCode Code[10]
FormattedQuantity Text
FormattedUnitPrice Text
FormattedVATPercentage Text
FormattedLineAmount Text
CommentLine Boolean

OnAfterSetSalesLine

[IntegrationEvent(False,False)]
local procedure OnAfterSetSalesLine(var SalesLine: Record "Sales Line", var FormattedQuantity: Text, var FormattedUnitPrice: Text, var FormattedVATPercentage: Text, var FormattedLineAmount: Text)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"
FormattedQuantity Text
FormattedUnitPrice Text
FormattedVATPercentage Text
FormattedLineAmount Text

OnAfterSetSalesInvoiceLine

[IntegrationEvent(False,False)]
local procedure OnAfterSetSalesInvoiceLine(var SalesInvoiceLine: Record "Sales Invoice Line", var FormattedQuantity: Text, var FormattedUnitPrice: Text, var FormattedVATPercentage: Text, var FormattedLineAmount: Text)

Parameters

Name Type Description
SalesInvoiceLine Table Microsoft.Sales.History."Sales Invoice Line"
FormattedQuantity Text
FormattedUnitPrice Text
FormattedVATPercentage Text
FormattedLineAmount Text

OnAfterSetSalesCrMemoLine

[IntegrationEvent(False,False)]
local procedure OnAfterSetSalesCrMemoLine(var SalesCrMemoLine: Record "Sales Cr.Memo Line", var FormattedQuantity: Text, var FormattedUnitPrice: Text, var FormattedVATPercentage: Text, var FormattedLineAmount: Text)

Parameters

Name Type Description
SalesCrMemoLine Table Microsoft.Sales.History."Sales Cr.Memo Line"
FormattedQuantity Text
FormattedUnitPrice Text
FormattedVATPercentage Text
FormattedLineAmount Text

OnAfterSetTotalLabels

[IntegrationEvent(False,False)]
local procedure OnAfterSetTotalLabels(CurrencyCode: Code[10], var TotalText: Text[50], var TotalInclVATText: Text[50], var TotalExclVATText: Text[50])

Parameters

Name Type Description
CurrencyCode Code[10]
TotalText Text[50]
TotalInclVATText Text[50]
TotalExclVATText Text[50]

OnBeforeSetLogoPosition

[IntegrationEvent(False,False)]
local procedure OnBeforeSetLogoPosition(var LogoPosition: Option, var CompanyInfo1: Record "Company Information", var CompanyInfo2: Record "Company Information", var CompanyInfo3: Record "Company Information", var IsHandled: Boolean)

Parameters

Name Type Description
LogoPosition Option
CompanyInfo1 Table Microsoft.Foundation.Company."Company Information"
CompanyInfo2 Table Microsoft.Foundation.Company."Company Information"
CompanyInfo3 Table Microsoft.Foundation.Company."Company Information"
IsHandled Boolean

OnBeforeSetPurchaser

[IntegrationEvent(False,False)]
local procedure OnBeforeSetPurchaser(var SalespersonPurchaser: Record "Salesperson/Purchaser", Code: Code[20], var PurchaserText: Text[50], var IsHandled: Boolean)

Parameters

Name Type Description
SalespersonPurchaser Table Microsoft.CRM.Team."Salesperson/Purchaser"
Code Code[20]
PurchaserText Text[50]
IsHandled Boolean

OnBeforeSetSalesPerson

[IntegrationEvent(False,False)]
local procedure OnBeforeSetSalesPerson(var SalespersonPurchaser: Record "Salesperson/Purchaser", Code: Code[20], var SalesPersonText: Text[50], var IsHandled: Boolean)

Parameters

Name Type Description
SalespersonPurchaser Table Microsoft.CRM.Team."Salesperson/Purchaser"
Code Code[20]
SalesPersonText Text[50]
IsHandled Boolean

OnBeforeSetSalesLine

[IntegrationEvent(False,False)]
local procedure OnBeforeSetSalesLine(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

OnBeforeSetSalesInvoiceLine

[IntegrationEvent(False,False)]
local procedure OnBeforeSetSalesInvoiceLine(var SalesInvoiceLine: Record "Sales Invoice Line")

Parameters

Name Type Description
SalesInvoiceLine Table Microsoft.Sales.History."Sales Invoice Line"

OnBeforeSetSalesCrMemoLine

[IntegrationEvent(False,False)]
local procedure OnBeforeSetSalesCrMemoLine(var SalesCrMemoLine: Record "Sales Cr.Memo Line")

Parameters

Name Type Description
SalesCrMemoLine Table Microsoft.Sales.History."Sales Cr.Memo Line"

OnAfterHideDocumentLine

[IntegrationEvent(False,False)]
local procedure OnAfterHideDocumentLine(HideLinesWithZeroQuantity: Boolean, RecordVariant: Variant, QuantityFieldId: Integer, var HideLine: Boolean)

Parameters

Name Type Description
HideLinesWithZeroQuantity Boolean
RecordVariant Variant
QuantityFieldId Integer
HideLine Boolean

See also