Share via


Codeunit "Customer Mgt."

ID 1302
Namespace: Microsoft.Sales.Customer

Methods

AvgDaysToPay

Obsolete

This element will become obsolete from version 27.0. Use procedure CalculatePaymentStats(CustomerNo: Code[20]; var Stats: Dictionary of [Text, Text]) instead.

[Obsolete(Use procedure CalculatePaymentStats(CustomerNo: Code[20]; var Stats: Dictionary of [Text, Text]) instead.,27.0)]
procedure AvgDaysToPay(CustNo: Code[20]): Decimal

Parameters

Name Type Description
CustNo Code[20]

Returns

Type Description
Decimal

CalculatePaymentStats

procedure CalculatePaymentStats(CustomerNo: Code[20], var Stats: Dictionary of [Text, Text])

Parameters

Name Type Description
CustomerNo Code[20]
Stats Dictionary of [Text, Text]

CalcLastPaymentInfo

procedure CalcLastPaymentInfo(CustomerNo: Code[20], var Stats: Dictionary of [Text, Text])

Parameters

Name Type Description
CustomerNo Code[20]
Stats Dictionary of [Text, Text]

CalcNumberOfDistinctItemsSold

procedure CalcNumberOfDistinctItemsSold(CustomerNo: Code[20], var Stats: Dictionary of [Text, Text])

Parameters

Name Type Description
CustomerNo Code[20]
Stats Dictionary of [Text, Text]

CalculateInteractionStats

procedure CalculateInteractionStats(CustomerNo: Code[20], var Stats: Dictionary of [Text, Text])

Parameters

Name Type Description
CustomerNo Code[20]
Stats Dictionary of [Text, Text]

CalculateStatistic

procedure CalculateStatistic(Customer: Record Customer, var AdjmtCostLCY: Decimal, var AdjCustProfit: Decimal, var AdjProfitPct: Decimal, var CustInvDiscAmountLCY: Decimal, var CustPaymentsLCY: Decimal, var CustSalesLCY: Decimal, var CustProfit: Decimal)

Parameters

Name Type Description
Customer Table Microsoft.Sales.Customer.Customer
AdjmtCostLCY Decimal
AdjCustProfit Decimal
AdjProfitPct Decimal
CustInvDiscAmountLCY Decimal
CustPaymentsLCY Decimal
CustSalesLCY Decimal
CustProfit Decimal

CalculateStatisticsWithCurrentCustomerValues

procedure CalculateStatisticsWithCurrentCustomerValues(var Customer: Record Customer, var AdjmtCostLCY: Decimal, var AdjCustProfit: Decimal, var AdjProfitPct: Decimal, var CustInvDiscAmountLCY: Decimal, var CustPaymentsLCY: Decimal, var CustSalesLCY: Decimal, var CustProfit: Decimal)

Parameters

Name Type Description
Customer Table Microsoft.Sales.Customer.Customer
AdjmtCostLCY Decimal
AdjCustProfit Decimal
AdjProfitPct Decimal
CustInvDiscAmountLCY Decimal
CustPaymentsLCY Decimal
CustSalesLCY Decimal
CustProfit Decimal

CalcAmountsOnPostedInvoices

procedure CalcAmountsOnPostedInvoices(CustNo: Code[20], var RecCount: Integer): Decimal

Parameters

Name Type Description
CustNo Code[20]
RecCount Integer

Returns

Type Description
Decimal

CalcAmountsOnPostedCrMemos

procedure CalcAmountsOnPostedCrMemos(CustNo: Code[20], var RecCount: Integer): Decimal

Parameters

Name Type Description
CustNo Code[20]
RecCount Integer

Returns

Type Description
Decimal

CalcAmountsOnOrders

procedure CalcAmountsOnOrders(CustNo: Code[20], var RecCount: Integer): Decimal

Parameters

Name Type Description
CustNo Code[20]
RecCount Integer

Returns

Type Description
Decimal

CalcAmountsOnQuotes

procedure CalcAmountsOnQuotes(CustNo: Code[20], var RecCount: Integer): Decimal

Parameters

Name Type Description
CustNo Code[20]
RecCount Integer

Returns

Type Description
Decimal

CalculateAmountsWithVATOnUnpostedDocuments

procedure CalculateAmountsWithVATOnUnpostedDocuments(CustNo: Code[20]): Decimal

Parameters

Name Type Description
CustNo Code[20]

Returns

Type Description
Decimal

CalculateAmountsOnUnpostedInvoices

procedure CalculateAmountsOnUnpostedInvoices(CustNo: Code[20], var RecCount: Integer): Decimal

Parameters

Name Type Description
CustNo Code[20]
RecCount Integer

Returns

Type Description
Decimal

CalculateAmountsOnUnpostedCrMemos

procedure CalculateAmountsOnUnpostedCrMemos(CustNo: Code[20], var RecCount: Integer): Decimal

Parameters

Name Type Description
CustNo Code[20]
RecCount Integer

Returns

Type Description
Decimal

DrillDownOnPostedInvoices

procedure DrillDownOnPostedInvoices(CustNo: Code[20])

Parameters

Name Type Description
CustNo Code[20]

DrillDownOnPostedCrMemo

procedure DrillDownOnPostedCrMemo(CustNo: Code[20])

Parameters

Name Type Description
CustNo Code[20]

DrillDownOnOrders

procedure DrillDownOnOrders(CustNo: Code[20])

Parameters

Name Type Description
CustNo Code[20]

DrillDownOnQuotes

procedure DrillDownOnQuotes(CustNo: Code[20])

Parameters

Name Type Description
CustNo Code[20]

DrillDownMoneyOwedExpected

procedure DrillDownMoneyOwedExpected(CustNo: Code[20])

Parameters

Name Type Description
CustNo Code[20]

DrillDownOnUnpostedInvoices

procedure DrillDownOnUnpostedInvoices(CustNo: Code[20])

Parameters

Name Type Description
CustNo Code[20]

DrillDownOnUnpostedCrMemos

procedure DrillDownOnUnpostedCrMemos(CustNo: Code[20])

Parameters

Name Type Description
CustNo Code[20]

GetCurrentYearFilter

procedure GetCurrentYearFilter(): Text[30]

Returns

Type Description
Text[30]

GetTotalSales

procedure GetTotalSales(CustNo: Code[20]): Decimal

Parameters

Name Type Description
CustNo Code[20]

Returns

Type Description
Decimal

GetYTDSales

procedure GetYTDSales(CustNo: Code[20]): Decimal

Parameters

Name Type Description
CustNo Code[20]

Returns

Type Description
Decimal

SearchForExternalDocNo

procedure SearchForExternalDocNo(var OriginalSalesHeader: Record "Sales Header"): Boolean

Parameters

Name Type Description
OriginalSalesHeader Table Microsoft.Sales.Document."Sales Header"

Returns

Type Description
Boolean

CalculateShipBillToOptions

procedure CalculateShipBillToOptions(var ShipToOptions: Enum "Sales Ship-to Options", var BillToOptions: Enum "Sales Bill-to Options", var SalesHeader: Record "Sales Header")

Parameters

Name Type Description
ShipToOptions Enum Microsoft.Sales.Document."Sales Ship-to Options"
BillToOptions Enum Microsoft.Sales.Document."Sales Bill-to Options"
SalesHeader Table Microsoft.Sales.Document."Sales Header"

Events

OnAfterSetFilterForPostedDocs

[IntegrationEvent(False,False)]
local procedure OnAfterSetFilterForPostedDocs(var CustLedgEntry: Record "Cust. Ledger Entry")

Parameters

Name Type Description
CustLedgEntry Table Microsoft.Sales.Receivables."Cust. Ledger Entry"

OnAfterSetFilterForUnpostedLines

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

Parameters

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

OnBeforeGetTotalSales

[IntegrationEvent(False,False)]
local procedure OnBeforeGetTotalSales(CustNo: Code[20], var Result: Decimal, var IsHandled: Boolean)

Parameters

Name Type Description
CustNo Code[20]
Result Decimal
IsHandled Boolean

SkipSettingFilter

[IntegrationEvent(False,False)]
local procedure SkipSettingFilter(var SkipSetFilter: Boolean)

Parameters

Name Type Description
SkipSetFilter Boolean

OnAfterCalculateShipBillToOptions

[IntegrationEvent(False,False)]
local procedure OnAfterCalculateShipBillToOptions(var ShipToOptions: Enum "Sales Ship-to Options", var BillToOptions: Enum "Sales Bill-to Options", SalesHeader: Record "Sales Header")

Parameters

Name Type Description
ShipToOptions Enum Microsoft.Sales.Document."Sales Ship-to Options"
BillToOptions Enum Microsoft.Sales.Document."Sales Bill-to Options"
SalesHeader Table Microsoft.Sales.Document."Sales Header"

OnBeforeSearchForExternalDocNo

[IntegrationEvent(False,False)]
local procedure OnBeforeSearchForExternalDocNo(var OriginalSalesHeader: Record "Sales Header", var ResultFound: Boolean, var IsHandled: Boolean)

Parameters

Name Type Description
OriginalSalesHeader Table Microsoft.Sales.Document."Sales Header"
ResultFound Boolean
IsHandled Boolean

OnBeforeCalculateStatisticsWithCurrentCustomerValues

[IntegrationEvent(False,False)]
local procedure OnBeforeCalculateStatisticsWithCurrentCustomerValues(var Customer: Record Customer, var AdjmtCostLCY: Decimal, var AdjCustProfit: Decimal, var AdjProfitPct: Decimal, var CustInvDiscAmountLCY: Decimal, var CustPaymentsLCY: Decimal, var CustSalesLCY: Decimal, var CustProfit: Decimal, var IsHandled: Boolean)

Parameters

Name Type Description
Customer Table Microsoft.Sales.Customer.Customer
AdjmtCostLCY Decimal
AdjCustProfit Decimal
AdjProfitPct Decimal
CustInvDiscAmountLCY Decimal
CustPaymentsLCY Decimal
CustSalesLCY Decimal
CustProfit Decimal
IsHandled Boolean

See also