Skip to content

KVSPSATimeTrackingChartMgt#

Events#

OnBeforeUpdateData(Record Business Chart Buffer, Date, Integer, Enum KVSPSAPeriodType, Boolean) :#

Summary: Event raised before updating the chart.

[IntegrationEvent(false, false)]
local procedure OnBeforeUpdateData(var BusinessChartBuffer: Record "Business Chart Buffer"; var StartDate: Date; var NoOfPeriods: Integer; var PeriodType: Enum "KVSPSAPeriodType"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSATimeTrackingChartMgt", 'OnBeforeUpdateData', '', false, false)]
local procedure DoSomethingOnBeforeUpdateData(var BusinessChartBuffer: Record "Business Chart Buffer"; var StartDate: Date; var NoOfPeriods: Integer; var PeriodType: Enum "KVSPSAPeriodType"; var IsHandled: Boolean)
begin
end;

Parameters:

  • BusinessChartBuffer: The chart buffer being initialized
  • StartDate: Start date of the current period for the chart
  • NoOfPeriods: Number of periods to display
  • PeriodType: Type of each period
  • IsHandled: Set to true to skip default chart update

OnAfterSetPeriodValues(Record Business Chart Buffer, Integer, Date, Date, Code[20], Decimal, Decimal, Decimal) :#

Summary: Event raised after setting chart values for a period. Allows addition of custom values.

[IntegrationEvent(false, false)]
local procedure OnAfterSetPeriodValues(var BusinessChartBuffer: Record "Business Chart Buffer"; PeriodCounter: Integer; var StartDate: Date; var ToDate: Date; ResNo: Code[20]; var PostedHours: Decimal; var CapacityHours: Decimal; var AbsenceTime: Decimal): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSATimeTrackingChartMgt", 'OnAfterSetPeriodValues', '', false, false)]
local procedure DoSomethingOnAfterSetPeriodValues(var BusinessChartBuffer: Record "Business Chart Buffer"; PeriodCounter: Integer; var StartDate: Date; var ToDate: Date; ResNo: Code[20]; var PostedHours: Decimal; var CapacityHours: Decimal; var AbsenceTime: Decimal)
begin
end;

Parameters:

  • BusinessChartBuffer: The business chart buffer the chart is using
  • PeriodCounter: Current period number
  • StartDate: Start date of current period
  • ToDate: End date of current period
  • ResNo: Resource number being processed
  • PostedHours: Posted hours for this period
  • CapacityHours: Capacity hours for this period
  • AbsenceTime: Absence time for this period

OnBeforeGetPostedHours(Decimal, Date, Date, Code[20], Boolean) :#

Summary: Event raised before calculating posted hours. Allows custom calculation logic.

[IntegrationEvent(false, false)]
local procedure OnBeforeGetPostedHours(var PostedHours: Decimal; FromDate: Date; ToDate: Date; ResNo: Code[20]; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSATimeTrackingChartMgt", 'OnBeforeGetPostedHours', '', false, false)]
local procedure DoSomethingOnBeforeGetPostedHours(var PostedHours: Decimal; FromDate: Date; ToDate: Date; ResNo: Code[20]; var IsHandled: Boolean)
begin
end;

Parameters:

  • PostedHours: Posted hours that will be processed
  • FromDate: Start date for calculation
  • ToDate: End date for calculation
  • ResNo: Resource number
  • IsHandled: Set to true to skip default posted hours calculation

OnBeforeGetCapacityHours(Decimal, Date, Date, Code[20], Boolean) :#

Summary: Event raised before calculating capacity hours. Allows custom calculation logic.

[IntegrationEvent(false, false)]
local procedure OnBeforeGetCapacityHours(var CapacityHours: Decimal; FromDate: Date; ToDate: Date; ResNo: Code[20]; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSATimeTrackingChartMgt", 'OnBeforeGetCapacityHours', '', false, false)]
local procedure DoSomethingOnBeforeGetCapacityHours(var CapacityHours: Decimal; FromDate: Date; ToDate: Date; ResNo: Code[20]; var IsHandled: Boolean)
begin
end;

Parameters:

  • CapacityHours: Capacity hours that will be processed
  • FromDate: Start date for calculation
  • ToDate: End date for calculation
  • ResNo: Resource number
  • IsHandled: Set to true to skip default capacity hours calculation

OnBeforeGetAbsenceTime(Decimal, Date, Date, Code[20], Boolean) :#

Summary: Event raised before calculating absence time. Allows custom calculation logic.

[IntegrationEvent(false, false)]
local procedure OnBeforeGetAbsenceTime(var AbsenceTime: Decimal; FromDate: Date; ToDate: Date; ResNo: Code[20]; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSATimeTrackingChartMgt", 'OnBeforeGetAbsenceTime', '', false, false)]
local procedure DoSomethingOnBeforeGetAbsenceTime(var AbsenceTime: Decimal; FromDate: Date; ToDate: Date; ResNo: Code[20]; var IsHandled: Boolean)
begin
end;

Parameters:

  • AbsenceTime: Absence time that will be processed
  • FromDate: Start date for calculation
  • ToDate: End date for calculation
  • ResNo: Resource number
  • IsHandled: Set to true to skip default absence time calculation

OnBeforeAddMeasures(Record Business Chart Buffer, Text, Text, Text, Boolean) :#

Summary: Event raised before adding default measures. Allows customization of chart measures.

[IntegrationEvent(false, false)]
local procedure OnBeforeAddMeasures(var BusinessChartBuffer: Record "Business Chart Buffer"; PostedHoursCaption: Text; RemainingCapacityCaption: Text; AbsenceCaption: Text; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSATimeTrackingChartMgt", 'OnBeforeAddMeasures', '', false, false)]
local procedure DoSomethingOnBeforeAddMeasures(var BusinessChartBuffer: Record "Business Chart Buffer"; PostedHoursCaption: Text; RemainingCapacityCaption: Text; AbsenceCaption: Text; var IsHandled: Boolean)
begin
end;

Parameters:

  • BusinessChartBuffer: The chart buffer to add measures to
  • PostedHoursCaption: Caption for posted hours default measure
  • RemainingCapacityCaption: Caption for remaining capacity default measure
  • AbsenceCaption: Caption for absence default measure
  • IsHandled: Set to true to skip default measure addition

OnBeforeCalcAndInsertColumns(Record Business Chart Buffer, Enum KVSPSAPeriodType, Integer, Date, Boolean) :#

Summary: Event raised before inserting columns. Allows custom column logic.

[IntegrationEvent(false, false)]
local procedure OnBeforeCalcAndInsertColumns(var BusinessChartBuffer: Record "Business Chart Buffer"; PeriodType: Enum "KVSPSAPeriodType"; NoOfPeriods: Integer; StartDate: Date; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSATimeTrackingChartMgt", 'OnBeforeCalcAndInsertColumns', '', false, false)]
local procedure DoSomethingOnBeforeCalcAndInsertColumns(var BusinessChartBuffer: Record "Business Chart Buffer"; PeriodType: Enum "KVSPSAPeriodType"; NoOfPeriods: Integer; StartDate: Date; var IsHandled: Boolean)
begin
end;

Parameters:

  • BusinessChartBuffer: The chart buffer to add columns to
  • PeriodType: Type of each period
  • NoOfPeriods: Number of periods to display
  • StartDate: Start date of the current period
  • IsHandled: Set to true to skip default column insertion

OnBeforeSetFromToPeriodText(Text, Enum KVSPSAPeriodType, Integer, Date, Boolean) :#

Summary: Event raised before setting period text that is displayed above the chart.

[IntegrationEvent(false, false)]
local procedure OnBeforeSetFromToPeriodText(var FromToPeriodText: Text; PeriodType: Enum "KVSPSAPeriodType"; NoOfPeriods: Integer; StartOfCurrentPeriodDate: Date; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSATimeTrackingChartMgt", 'OnBeforeSetFromToPeriodText', '', false, false)]
local procedure DoSomethingOnBeforeSetFromToPeriodText(var FromToPeriodText: Text; PeriodType: Enum "KVSPSAPeriodType"; NoOfPeriods: Integer; StartOfCurrentPeriodDate: Date; var IsHandled: Boolean)
begin
end;

Parameters:

  • FromToPeriodText: Period text that will be displayed
  • PeriodType: Type of current period
  • NoOfPeriods: Number of periods the chart displays
  • StartOfCurrentPeriodDate: Start date of current period
  • IsHandled: Set to true to skip default period text formatting

OnBeforeDataPointClicked(JsonObject, Date, Enum KVSPSAPeriodType, Integer, Boolean) :#

Summary: Event raised before handling the click on a data point.

[IntegrationEvent(false, false)]
local procedure OnBeforeDataPointClicked(Point: JsonObject; var StartOfCurrPeriodDate: Date; var PeriodType: Enum "KVSPSAPeriodType"; var NoOfPeriods: Integer; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSATimeTrackingChartMgt", 'OnBeforeDataPointClicked', '', false, false)]
local procedure DoSomethingOnBeforeDataPointClicked(Point: JsonObject; var StartOfCurrPeriodDate: Date; var PeriodType: Enum "KVSPSAPeriodType"; var NoOfPeriods: Integer; var IsHandled: Boolean)
begin
end;

Parameters:

  • Point: JsonObject containing information about the clicked data point
  • StartOfCurrPeriodDate: Current period start date
  • PeriodType: Current period type
  • NoOfPeriods: Number of periods
  • IsHandled: Set to true to skip default click handling

OnBeforeSetValue(Record Business Chart Buffer, Text, Boolean) :#

Summary: Event raised before setting a value in the business chart buffer. Allows custom value modification or handling.

[IntegrationEvent(false, false)]
local procedure OnBeforeSetValue(var BusinessChartBuffer: Record "Business Chart Buffer"; MeasureName: Text; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSATimeTrackingChartMgt", 'OnBeforeSetValue', '', false, false)]
local procedure DoSomethingOnBeforeSetValue(var BusinessChartBuffer: Record "Business Chart Buffer"; MeasureName: Text; var IsHandled: Boolean)
begin
end;

Parameters:

  • BusinessChartBuffer: The chart buffer to set the value in
  • MeasureName: Name of the measure to set the value for
  • IsHandled: Set to true to skip default value setting

OnAfterSetPeriodLength(Record Business Chart Buffer, Enum KVSPSAPeriodType) :#

Summary: Event raised after setting the period length in the business chart buffer. Allows custom period length handling.

[IntegrationEvent(false, false)]
local procedure OnAfterSetPeriodLength(var BusinessChartBuffer: Record "Business Chart Buffer"; PeriodType: Enum "KVSPSAPeriodType"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSATimeTrackingChartMgt", 'OnAfterSetPeriodLength', '', false, false)]
local procedure DoSomethingOnAfterSetPeriodLength(var BusinessChartBuffer: Record "Business Chart Buffer"; PeriodType: Enum "KVSPSAPeriodType")
begin
end;

Parameters:

  • BusinessChartBuffer: The chart buffer to set the period length in
  • PeriodType: The period type the buffer is supposed to use