Skip to content

KVSPSAGet Activity Management#

Procedures#

OnRun#

procedure OnRun(Rec: Record "#437dbf0e84ff417a965ded2bb9650972#Purchase Line")

FilterTempBudgetLines(Record KVSPSA Job Budget Line, Boolean, Code[20], Code[20], Code[20], Code[20], Code[20], Code[20], Boolean) :#

Summary: FilterTempBudgetLines filters the temporary job budget lines based on various parameters. It applies filters for resources, work packages, phases, tasks, steps, and to-do numbers. If the IsRes parameter is true, it filters for resource lines; otherwise, it filters for budget lines. The function also considers whether the job document is being processed and applies specific filters accordingly. The function uses the GlobalJobsSetup and KVSPSAGeneral Functions PSA codeunit to manage the filtering logic. It also appends resource numbers and service package filters to the text builder for filtering.

procedure FilterTempBudgetLines(var JobBudgetLine: Record "KVSPSA Job Budget Line"; IsRes: Boolean; ResourceNo: Code[20]; ToDoNo: Code[20]; ActWorkPackageCode: Code[20]; ActPhaseCode: Code[20]; ActTaskCode: Code[20]; ActStepCode: Code[20]; JobDoc: Boolean): 

Parameters:

  • JobBudgetLine: Record where the filter is assigned.
  • IsRes: Indicates whether the budget lines are for resources.
  • ResourceNo: The resource number to filter by.
  • ToDoNo: The to-do number to filter by.
  • ActWorkPackageCode: The work package code to filter by.
  • ActPhaseCode: The phase code to filter by.
  • ActTaskCode: The task code to filter by.
  • ActStepCode: The step code to filter by.
  • JobDoc: Indicates whether the budget lines are for a job document.

GetActivity(Code[20], Code[20], Code[20], Code[20], Code[20], Code[20], Text[100], Enum KVSPSAActType, Code[10], Integer, Code[20], Option) :#

Summary: GetActivity retrieves activity details for a job based on the provided parameters.

procedure GetActivity(ActJobNo: Code[20]; ActNo: Code[20]; var ActWorkPackage: Code[20]; var ActPhaseCode: Code[20]; var ActTaskCode: Code[20]; var ActStepCode: Code[20]; var ActDescription: Text[100]; ActType: Enum "KVSPSAActType"; var ActWorkTypeCode: Code[10]; var ActBudgetlineNo: Integer; var ActBudgetLineToDoNo: Code[20]; Source: Option): 

Parameters:

  • ActJobNo: The job number for which to retrieve activity details.
  • ActNo: The activity number to retrieve details for.
  • ActWorkPackage: The work package code associated with the activity.
  • ActPhaseCode: The phase code associated with the activity.
  • ActTaskCode: The task code associated with the activity.
  • ActStepCode: The step code associated with the activity.
  • ActDescription: The description of the activity.
  • ActType: The type of activity, represented as an enumeration.
  • ActWorkTypeCode: The work type code associated with the activity.
  • ActBudgetlineNo: The budget line number associated with the activity.
  • ActBudgetLineToDoNo: The to-do number associated with the budget line.
  • Source: The source of the activity, which can be one of several options such as Purchase, Sales, Service, etc.

GetActivity(Code[20], Code[20], Code[20], Code[20], Code[20], Code[20], Text[100], Enum KVSPSAActType, Enum KVSPSAPspInvoicingType, Code[10], Integer, Code[20], Option) :#

Summary: GetActivity retrieves activity details for a job based on the provided parameters. This procedure is an overload of the GetActivity method that includes an additional parameter for the invoicing type.

procedure GetActivity(ActJobNo: Code[20]; ActNo: Code[20]; var ActWorkPackage: Code[20]; var ActPhaseCode: Code[20]; var ActTaskCode: Code[20]; var ActStepCode: Code[20]; var ActDescription: Text[100]; ActType: Enum "KVSPSAActType"; var ActDeductible: Enum "KVSPSAPspInvoicingType"; var ActWorkTypeCode: Code[10]; var ActBudgetLineNo: Integer; var ActBudgetLineToDoNo: Code[20]; Source: Option): 

Parameters:

  • ActJobNo: The job number for which to retrieve activity details.
  • ActNo: The activity number to retrieve details for.
  • ActWorkPackage: The work package code associated with the activity.
  • ActPhaseCode: The phase code associated with the activity.
  • ActTaskCode: The task code associated with the activity.
  • ActStepCode: The step code associated with the activity.
  • ActDescription: The description of the activity.
  • ActType: The type of activity, represented as an enumeration.
  • ActDeductible: The invoicing type associated with the activity, represented as an enumeration.
  • ActWorkTypeCode: The work type code associated with the activity.
  • ActBudgetLineNo: The budget line number associated with the activity.
  • ActBudgetLineToDoNo: The to-do number associated with the budget line.
  • Source: The source of the activity, which can be one of several options such as Purchase, Sales, Service, etc.

GetActivityForJobTimeJournalLine(Record KVSPSAJobTimeJournalLine) :#

Summary: Get activity for job time journal line.

procedure GetActivityForJobTimeJournalLine(var JobTimeJournalLine: Record "KVSPSAJobTimeJournalLine"): 

Parameters:

  • JobTimeJournalLine:

GetChosenRecords(Record KVSPSAWork Package, Record KVSPSAJobPSPLine, Record KVSPSA Job Budget Line) :#

Summary: GetChosenRecords retrieves the currently chosen records for work package, job PSP line, and job budget line. This procedure is used to access the global variables that store the currently selected records.

procedure GetChosenRecords(var NewWorkPackage: Record "KVSPSAWork Package"; var NewJobPSPLine: Record "KVSPSAJobPSPLine"; var NewJobBudgetLine: Record "KVSPSA Job Budget Line"): 

Parameters:

  • NewWorkPackage: The work package record to be returned.
  • NewJobPSPLine: The job PSP line record to be returned.
  • NewJobBudgetLine: The job budget line record to be returned.

GetTempBudgetLinesForJob(Record Job, Record KVSPSA Job Budget Line, Boolean) :#

Summary: GetTempBudgetLinesForJob retrieves temporary budget lines for a specific job. It populates the JobBudgetLine record with budget lines that are active and in progress. It also retrieves job PSP lines and sets the job budget line for each activity.

procedure GetTempBudgetLinesForJob(Job: Record "Job"; var JobBudgetLine: Record "KVSPSA Job Budget Line"; IsResource: Boolean): 

Parameters:

  • Job: The job record for which to retrieve budget lines.
  • JobBudgetLine: The record where the budget lines will be stored.
  • IsResource: Indicates whether the budget lines are for resources.

SetChosenRecords(Record KVSPSAWork Package, Record KVSPSAJobPSPLine, Record KVSPSA Job Budget Line) :#

Summary: SetChosenRecords sets the currently chosen records for work package, job PSP line, and job budget line. This procedure is used to update the global variables that store the currently selected records.

procedure SetChosenRecords(var NewWorkPackage: Record "KVSPSAWork Package"; var NewJobPSPLine: Record "KVSPSAJobPSPLine"; var NewJobBudgetLine: Record "KVSPSA Job Budget Line"): 

Parameters:

  • NewWorkPackage: The new work package record to be set.
  • NewJobPSPLine: The new job PSP line record to be set.
  • NewJobBudgetLine: The new job budget line record to be set.

SetHideDialogConfirms(Boolean, Boolean, Boolean) :#

Summary: SetHideDialogConfirms sets the global flags for hiding dialog confirms and forms.

procedure SetHideDialogConfirms(NewHideDialogConfirms: Boolean; NewNewPricesInResLines: Boolean; NewDescription: Boolean): 

Parameters:

  • NewHideDialogConfirms: Indicates whether to hide dialog confirms.
  • NewNewPricesInResLines: Indicates whether to use new prices in resource lines.
  • NewDescription: Indicates whether to set a new description.

SetHideDialogForms(Boolean) :#

Summary: SetHideDialogForms sets the global flag for hiding dialog forms. This procedure is used to control whether dialog forms should be displayed or not.

procedure SetHideDialogForms(NewHideDialogForms: Boolean): 

Parameters:

  • NewHideDialogForms: Indicates whether to hide dialog forms.

Events#

KVSPSAOnAfterExistingSalesDocumentTextFilteredInTransferDocumentText(Record Sales Line, Record KVSKBASalesDocumentText, Enum KVSKBATextPosition) :#

Summary: Event fired after filtering existing sales document text during document text transfer. Allows extensions to modify the filtered document text or apply additional filtering criteria. This event enables customization of sales document text filtering logic when transferring text from existing documents based on text position and document criteria.

[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterExistingSalesDocumentTextFilteredInTransferDocumentText(SalesLine: Record "Sales Line"; var KVSKBASalesDocumentText: Record "KVSKBASalesDocumentText"; CurrTextPosition: Enum "KVSKBATextPosition"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAGet Activity Management", 'KVSPSAOnAfterExistingSalesDocumentTextFilteredInTransferDocumentText', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterExistingSalesDocumentTextFilteredInTransferDocumentText(SalesLine: Record "Sales Line"; var KVSKBASalesDocumentText: Record "KVSKBASalesDocumentText"; CurrTextPosition: Enum "KVSKBATextPosition")
begin
end;

Parameters:

  • SalesLine: The sales line associated with the document text being filtered.
  • KVSKBASalesDocumentText: The sales document text record being filtered (passed by reference for modification).
  • CurrTextPosition: The current text position enum indicating where in the document the text should be positioned.

KVSPSAOnAfterFilterTempBudgetLines(Record KVSPSA Job Budget Line, Boolean, Code[20], Code[20], Code[20], Code[20], Code[20], Code[20], Boolean) :#

Summary: Event fired after filtering temporary budget lines during activity management processing. Allows extensions to modify the filtered budget line set or apply additional filtering criteria. This event enables customization of budget line filtering logic based on resource, to-do, work package, phase, task, step codes, and document type (job document vs. other sources).

[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterFilterTempBudgetLines(var JobBudgetLine: Record "KVSPSA Job Budget Line"; IsResource: Boolean; ResourceNo: Code[20]; ToDoNo: Code[20]; WorkPackageCode: Code[20]; PhaseCode: Code[20]; TaskCode: Code[20]; StepCode: Code[20]; JobDocument: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAGet Activity Management", 'KVSPSAOnAfterFilterTempBudgetLines', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterFilterTempBudgetLines(var JobBudgetLine: Record "KVSPSA Job Budget Line"; IsResource: Boolean; ResourceNo: Code[20]; ToDoNo: Code[20]; WorkPackageCode: Code[20]; PhaseCode: Code[20]; TaskCode: Code[20]; StepCode: Code[20]; JobDocument: Boolean)
begin
end;

Parameters:

  • JobBudgetLine: The filtered job budget line record (passed by reference for modification).
  • IsResource: Boolean indicating whether the activity is resource-related.
  • ResourceNo: The resource number used as a filter criteria for budget lines.
  • ToDoNo: The to-do number used as a filter criteria for budget lines.
  • WorkPackageCode: The work package code used as a filter criteria for budget lines.
  • PhaseCode: The phase code used as a filter criteria for budget lines.
  • TaskCode: The task code used as a filter criteria for budget lines.
  • StepCode: The step code used as a filter criteria for budget lines.
  • JobDocument: Boolean indicating whether the source is a job document.

KVSPSAOnAfterGetActivityForGenJournalLine(Record Gen. Journal Line) :#

Summary: Event fired after activity selection for a general journal line during activity management processing. Allows extensions to perform additional actions or transfer information after activity assignment. This event enables custom processing after work package, phase, task, and step codes have been assigned to a general journal line, allowing extensions to read the chosen WBS line and perform additional logic.

[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterGetActivityForGenJournalLine(var GenJournalLine: Record "Gen. Journal Line"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAGet Activity Management", 'KVSPSAOnAfterGetActivityForGenJournalLine', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterGetActivityForGenJournalLine(var GenJournalLine: Record "Gen. Journal Line")
begin
end;

Parameters:

  • GenJournalLine: The general journal line that received the activity selection (passed by reference for potential modification).

KVSPSAOnAfterGetActivityForJobDocumentLine(Record KVSPSAJob Document Line) :#

Summary: Event fired after activity selection for a job document line during activity management processing. Allows extensions to perform additional actions or transfer information after activity assignment. This event enables custom processing after work package, phase, task, and step codes have been assigned to a job document line, allowing extensions to read the chosen WBS line and perform additional logic.

[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterGetActivityForJobDocumentLine(var JobDocumentLine: Record "KVSPSAJob Document Line"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAGet Activity Management", 'KVSPSAOnAfterGetActivityForJobDocumentLine', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterGetActivityForJobDocumentLine(var JobDocumentLine: Record "KVSPSAJob Document Line")
begin
end;

Parameters:

  • JobDocumentLine: The job document line that received the activity selection (passed by reference for potential modification).

KVSPSAOnAfterGetActivityForJobPaymentPlanningEntry(Record KVSPSAJobPaymentPlanningEntry) :#

Summary: Event fired after activity selection for a job payment planning entry during activity management processing. Allows extensions to perform additional actions or transfer information after the target WBS line has been chosen. This event enables custom processing after work package, phase, task, and step codes have been assigned to a job payment planning entry, allowing extensions to read the chosen target WBS line and perform additional validation or data transfer.

[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterGetActivityForJobPaymentPlanningEntry(var JobPaymentPlanningEntry: Record "KVSPSAJobPaymentPlanningEntry"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAGet Activity Management", 'KVSPSAOnAfterGetActivityForJobPaymentPlanningEntry', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterGetActivityForJobPaymentPlanningEntry(var JobPaymentPlanningEntry: Record "KVSPSAJobPaymentPlanningEntry")
begin
end;

Parameters:

  • JobPaymentPlanningEntry: The job payment planning entry that received the target activity selection (passed by reference for potential modification).

KVSPSAOnAfterGetActivityForJobPaymentPlanningEntrySource(Record KVSPSAJobPaymentPlanningEntry) :#

Summary: Event fired after source activity selection for a job payment planning entry during activity management processing. Allows extensions to perform additional actions or transfer information after the source WBS line has been chosen. This event enables custom processing after source work package, phase, task, and step codes have been assigned to a job payment planning entry, allowing extensions to read the chosen source WBS line and perform additional validation or data transfer.

[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterGetActivityForJobPaymentPlanningEntrySource(var JobPaymentPlanningEntry: Record "KVSPSAJobPaymentPlanningEntry"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAGet Activity Management", 'KVSPSAOnAfterGetActivityForJobPaymentPlanningEntrySource', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterGetActivityForJobPaymentPlanningEntrySource(var JobPaymentPlanningEntry: Record "KVSPSAJobPaymentPlanningEntry")
begin
end;

Parameters:

  • JobPaymentPlanningEntry: The job payment planning entry that received the source activity selection (passed by reference for potential modification).

KVSPSAOnAfterSalesLineActivitySelected(Record Sales Header, Record Sales Line) :#

Summary: Event fired after a sales line activity has been selected during activity management processing. Allows extensions to perform additional actions after activity selection. This event enables custom processing or validation after work package, phase, task, and step codes have been assigned to a sales line during activity selection workflow.

[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterSalesLineActivitySelected(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAGet Activity Management", 'KVSPSAOnAfterSalesLineActivitySelected', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterSalesLineActivitySelected(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line")
begin
end;

Parameters:

  • SalesHeader: The sales header associated with the sales line that had activity selected.
  • SalesLine: The sales line that received the activity selection (passed by reference for potential modification).

KVSPSAOnAfterSetBudgetLineFilterInGetActivity(Record KVSPSA Job Budget Line, Option) :#

Summary: Event fired after setting budget line filter during activity retrieval. Allows extensions to modify the budget line filter based on source document type. This event enables custom filtering logic for budget lines when determining available activities based on source (Purchase, Sales, Service, GenJournal, Segment, PaymentPlan, JobDoc).

[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterSetBudgetLineFilterInGetActivity(var JobBudgetLine: Record "KVSPSA Job Budget Line"; Source: Option): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAGet Activity Management", 'KVSPSAOnAfterSetBudgetLineFilterInGetActivity', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterSetBudgetLineFilterInGetActivity(var JobBudgetLine: Record "KVSPSA Job Budget Line"; Source: Option)
begin
end;

Parameters:

  • JobBudgetLine: The job budget line with applied filter (passed by reference for additional filtering or modification).
  • Source: The source option indicating the type of document requesting activity selection (Purchase, Sales, Service, GenJournal, Segment, PaymentPlan, JobDoc).

KVSPSAOnAfterSetPostingLevelBeforeGetActivity(Enum KVSPSAPostingLevel, Option) :#

Summary: Event fired after determining the posting level but before activity selection begins. Allows extensions to modify or override the posting level based on the source document type. This event enables custom logic to adjust posting level configuration for different source document types (Purchase, Sales, Service, GenJournal, Segment, PaymentPlan, JobDoc) before the activity selection process starts.

[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterSetPostingLevelBeforeGetActivity(var PostingLevel: Enum "KVSPSAPostingLevel"; Source: Option): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAGet Activity Management", 'KVSPSAOnAfterSetPostingLevelBeforeGetActivity', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterSetPostingLevelBeforeGetActivity(var PostingLevel: Enum "KVSPSAPostingLevel"; Source: Option)
begin
end;

Parameters:

  • PostingLevel: The posting level enum that has been determined (passed by reference for modification).
  • Source: The source option indicating the type of document requesting activity selection (Purchase=0, Sales=1, Service=2, GenJournal=3, Segment=4, PaymentPlan=5, JobDoc=6).

KVSPSAOnAfterSetWBSLineFilterInGetActivity(Record KVSPSAJobPSPLine, Option) :#

Summary: Event fired after setting WBS (Work Breakdown Structure) line filter during activity retrieval. Allows extensions to modify the PSP line filter based on source document type. This event enables custom filtering logic for PSP lines when determining available work packages based on source (Purchase, Sales, Service, GenJournal, Segment, PaymentPlan, JobDoc).

[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterSetWBSLineFilterInGetActivity(var JobPSPLine: Record "KVSPSAJobPSPLine"; Source: Option): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAGet Activity Management", 'KVSPSAOnAfterSetWBSLineFilterInGetActivity', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterSetWBSLineFilterInGetActivity(var JobPSPLine: Record "KVSPSAJobPSPLine"; Source: Option)
begin
end;

Parameters:

  • JobPSPLine: The job PSP line with applied filter (passed by reference for additional filtering or modification).
  • Source: The source option indicating the type of document requesting activity selection (Purchase, Sales, Service, GenJournal, Segment, PaymentPlan, JobDoc).

KVSPSAOnBeforeTransferDocumentText(Record Sales Line, Boolean) :#

Summary: Event fired before transferring document text from WBS/budget to a sales line. Allows extensions to prevent or customize the document text transfer process. This event enables custom logic to intercept document text transfer, perform validation, or implement alternative text transfer mechanisms for sales lines.

[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeTransferDocumentText(var SalesLine: Record "Sales Line"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAGet Activity Management", 'KVSPSAOnBeforeTransferDocumentText', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeTransferDocumentText(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)
begin
end;

Parameters:

  • SalesLine: The sales line that is about to receive document text transfer.
  • IsHandled: Boolean flag to indicate if the event has been handled by an extension. Set to true to prevent default document text transfer logic from executing.

KVSPSAOnBeforeCheckJobTeamFilterOnTimePostInGetActivityTime(Boolean) :#

Summary: Event fired before checking job team filter on time posting during activity time selection. Allows extensions to skip or customize the job team filter validation. This event enables custom logic to bypass the job team filter requirement when selecting activities for time entries, useful for scenarios where job team membership should not restrict activity selection.

[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeCheckJobTeamFilterOnTimePostInGetActivityTime(var SkipCheckJobTeamFilterOnTimePost: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAGet Activity Management", 'KVSPSAOnBeforeCheckJobTeamFilterOnTimePostInGetActivityTime', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeCheckJobTeamFilterOnTimePostInGetActivityTime(var SkipCheckJobTeamFilterOnTimePost: Boolean)
begin
end;

Parameters:

  • SkipCheckJobTeamFilterOnTimePost: Boolean flag to skip the job team filter check. Set to true to bypass job team membership validation during time posting activity selection.

KVSPSAOnBeforeConfirmTransferDescription(RecordId, Boolean, Boolean) :#

Summary: Event fired before confirming whether to transfer WBS or budget line description to a document line. Allows extensions to automatically answer or customize the confirmation dialog. This event enables custom logic to control description transfer confirmation, useful for automated processes or custom business rules that determine when descriptions should be copied without user interaction.

[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeConfirmTransferDescription(SourceRecordID: RecordId; var ConfirmedQuestion: Boolean; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAGet Activity Management", 'KVSPSAOnBeforeConfirmTransferDescription', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeConfirmTransferDescription(SourceRecordID: RecordId; var ConfirmedQuestion: Boolean; var IsHandled: Boolean)
begin
end;

Parameters:

  • SourceRecordID: The RecordId of the source record (document line) that is requesting description transfer.
  • ConfirmedQuestion: Boolean flag indicating the confirmation response. Set to true to automatically confirm description transfer, false to deny.
  • IsHandled: Boolean flag to indicate if the event has been handled by an extension. Set to true to prevent the default confirmation dialog from showing.

KVSPSAOnBeforeConfirmTransferDocumentText(RecordId, Boolean, Boolean) :#

Summary: Event fired before confirming whether to replace existing document texts with new texts from WBS or budget. Allows extensions to automatically answer or customize the confirmation dialog. This event enables custom logic to control document text transfer confirmation, useful for automated processes or custom business rules that determine when document texts should be replaced without user interaction.

[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeConfirmTransferDocumentText(SourceRecordID: RecordId; var TransferDocumentText: Boolean; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAGet Activity Management", 'KVSPSAOnBeforeConfirmTransferDocumentText', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeConfirmTransferDocumentText(SourceRecordID: RecordId; var TransferDocumentText: Boolean; var IsHandled: Boolean)
begin
end;

Parameters:

  • SourceRecordID: The RecordId of the source record (document line) that is requesting document text replacement.
  • TransferDocumentText: Boolean flag indicating whether to transfer document text. Set to true to automatically confirm document text replacement, false to deny.
  • IsHandled: Boolean flag to indicate if the event has been handled by an extension. Set to true to prevent the default confirmation dialog from showing.

KVSPSAOnBeforeErrorForEmptyNo(Record Purchase Line, Boolean) :#

Summary: Event fired before raising an error when the No. field is empty during work package selection on a purchase line. Allows extensions to suppress or customize this validation error. This event enables custom logic to bypass the requirement for a No. field when selecting a work package, useful for scenarios where the item/resource number should be determined after work package selection.

[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeErrorForEmptyNo(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAGet Activity Management", 'KVSPSAOnBeforeErrorForEmptyNo', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeErrorForEmptyNo(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean)
begin
end;

Parameters:

  • PurchaseLine: The purchase line being validated that has an empty No. field.
  • IsHandled: Boolean flag to indicate if the event has been handled by an extension. Set to true to suppress the error and allow work package selection without a No. field value.

KVSPSAOnBeforePrepareActivities(Code[20], Enum KVSPSAActType, Code[20], Record KVSPSA Job Budget Line, Record Sales Line, Boolean) :#

Summary: Event fired before preparing activities for selection during sales line activity management. Allows extensions to customize or replace the activity preparation logic. This event enables custom logic to modify which job budget lines and PSP lines are made available for activity selection, or to completely override the default activity preparation process.

[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforePrepareActivities(JobNo: Code[20]; ActType: Enum "KVSPSAActType"; ActNo: Code[20]; var JobBudgetLine: Record "KVSPSA Job Budget Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAGet Activity Management", 'KVSPSAOnBeforePrepareActivities', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforePrepareActivities(JobNo: Code[20]; ActType: Enum "KVSPSAActType"; ActNo: Code[20]; var JobBudgetLine: Record "KVSPSA Job Budget Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean)
begin
end;

Parameters:

  • JobNo: The job number for which activities are being prepared.
  • ActType: The activity type enum indicating the type of activity (Resource, Item, G/L Account) being prepared.
  • ActNo: The activity number (item no., resource no., etc.) being filtered for activity preparation.
  • JobBudgetLine: The job budget line record being prepared (passed by reference for modification or population).
  • SalesLine: The sales line requesting activity selection, used for context and filtering.
  • IsHandled: Boolean flag to indicate if the event has been handled by an extension. Set to true to prevent default activity preparation logic from executing.

KVSPSAOnBeforeTransferJobBudgetLineFields(Record KVSPSA Job Budget Line, Code[20]) :#

Summary: Event fired before transferring job budget line fields during time entry activity selection. Allows extensions to modify filtering or selection criteria for budget lines. This event enables custom logic to adjust job budget line filters based on resource number before presenting available activities for time recording, useful for implementing custom resource-based filtering rules.

[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeTransferJobBudgetLineFields(var JobBudgetLine: Record "KVSPSA Job Budget Line"; ResourceNo: Code[20]): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAGet Activity Management", 'KVSPSAOnBeforeTransferJobBudgetLineFields', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeTransferJobBudgetLineFields(var JobBudgetLine: Record "KVSPSA Job Budget Line"; ResourceNo: Code[20])
begin
end;

Parameters:

  • JobBudgetLine: The job budget line record with current filters applied (passed by reference for additional filtering or modification).
  • ResourceNo: The resource number for which budget line activities are being filtered and prepared.

KVSPSAOnSetFilterOnBudgetLineOnPrepareActivities(Record Jobs Setup, Record KVSPSA Job Budget Line, Record Sales Line) :#

Summary: Event fired when setting filters on budget lines during activity preparation for sales lines. Allows extensions to apply additional filters or modify existing filters on job budget lines. This event enables custom filtering logic based on jobs setup configuration and sales line context to control which budget lines are available for activity selection.

[IntegrationEvent(false, false)]
local procedure KVSPSAOnSetFilterOnBudgetLineOnPrepareActivities(JobsSetup: Record "Jobs Setup"; var JobBudgetLine: Record "KVSPSA Job Budget Line"; SalesLine: Record "Sales Line"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAGet Activity Management", 'KVSPSAOnSetFilterOnBudgetLineOnPrepareActivities', '', false, false)]
local procedure DoSomethingKVSPSAOnSetFilterOnBudgetLineOnPrepareActivities(JobsSetup: Record "Jobs Setup"; var JobBudgetLine: Record "KVSPSA Job Budget Line"; SalesLine: Record "Sales Line")
begin
end;

Parameters:

  • JobsSetup: The Jobs Setup record containing configuration settings that may influence budget line filtering.
  • JobBudgetLine: The job budget line record with current filters applied (passed by reference for additional filtering or modification).
  • SalesLine: The sales line requesting activity selection, providing context for custom filtering logic.

KVSPSAOnSetFilterOnWBSLineOnPrepareActivities(Record KVSPSAJobPSPLine, Record Sales Line) :#

Summary: Event fired when setting filters on WBS (Work Breakdown Structure) lines during activity preparation for sales lines. Allows extensions to apply additional filters or modify existing filters on job PSP lines. This event enables custom filtering logic based on sales line context to control which work packages are available for activity selection in sales documents.

[IntegrationEvent(false, false)]
local procedure KVSPSAOnSetFilterOnWBSLineOnPrepareActivities(var JobPSPLine: Record "KVSPSAJobPSPLine"; SalesLine: Record "Sales Line"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAGet Activity Management", 'KVSPSAOnSetFilterOnWBSLineOnPrepareActivities', '', false, false)]
local procedure DoSomethingKVSPSAOnSetFilterOnWBSLineOnPrepareActivities(var JobPSPLine: Record "KVSPSAJobPSPLine"; SalesLine: Record "Sales Line")
begin
end;

Parameters:

  • JobPSPLine: The job PSP line record with current filters applied (passed by reference for additional filtering or modification).
  • SalesLine: The sales line requesting activity selection, providing context for custom filtering logic.