KVSPSACreate SalesDoc from PSP#
Events#
KVSPSAOnAfterCopyPSAJobBudgetLineToSalesLine(Record Sales Line, Record KVSPSA Job Budget Line) :#
Summary: After copying a Job Budget Line to a Sales Line. Use to adjust prices, dimensions or custom fields.
[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterCopyPSAJobBudgetLineToSalesLine(var SalesLine: Record "Sales Line"; var JobBudgetLine: Record "KVSPSA Job Budget Line"):
[EventSubscriber(ObjectType::Report, Report::"KVSPSACreate SalesDoc from PSP", 'KVSPSAOnAfterCopyPSAJobBudgetLineToSalesLine', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterCopyPSAJobBudgetLineToSalesLine(var SalesLine: Record "Sales Line"; var JobBudgetLine: Record "KVSPSA Job Budget Line")
begin
end;
Parameters:
SalesLine: Target sales line (values already populated by standard logic).JobBudgetLine: Source job budget line.
KVSPSAOnAfterCopyPSPLineToSalesLine(Record Sales Line, Record KVSPSAJobPSPLine) :#
Summary: After copying a PSP (WBS) line to the Sales Line.
[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterCopyPSPLineToSalesLine(var SalesLine: Record "Sales Line"; var JobPSPLine: Record "KVSPSAJobPSPLine"):
[EventSubscriber(ObjectType::Report, Report::"KVSPSACreate SalesDoc from PSP", 'KVSPSAOnAfterCopyPSPLineToSalesLine', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterCopyPSPLineToSalesLine(var SalesLine: Record "Sales Line"; var JobPSPLine: Record "KVSPSAJobPSPLine")
begin
end;
Parameters:
SalesLine: Created/updated sales line.JobPSPLine: Source PSP line.
KVSPSAOnAfterExistingSalesDocumentTextFilteredInCopyPSPText(Record Sales Line, Record KVSKBASalesDocumentText, Enum KVSKBATextPosition) :#
Summary: After filtering existing sales document text lines for the current sales line and text position (before inserting new text lines).
[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterExistingSalesDocumentTextFilteredInCopyPSPText(SalesLine: Record "Sales Line"; var KVSKBASalesDocumentText: Record "KVSKBASalesDocumentText"; CurrTextPosition: Enum "KVSKBATextPosition"):
[EventSubscriber(ObjectType::Report, Report::"KVSPSACreate SalesDoc from PSP", 'KVSPSAOnAfterExistingSalesDocumentTextFilteredInCopyPSPText', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterExistingSalesDocumentTextFilteredInCopyPSPText(SalesLine: Record "Sales Line"; var KVSKBASalesDocumentText: Record "KVSKBASalesDocumentText"; CurrTextPosition: Enum "KVSKBATextPosition")
begin
end;
Parameters:
SalesLine: Current sales line.KVSKBASalesDocumentText: Filtered text record set (modify to delete / adjust existing lines).CurrTextPosition: Current text position enum.
KVSPSAOnBeforeCheckForTemporaryPSPLine(Record KVSPSAJobPSPLine, Record KVSPSAJobPSPLine, Boolean, Boolean) :#
Summary: Before checking whether a PSP line is already present in the temporary buffer.
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeCheckForTemporaryPSPLine(var JobPSPLine: Record "KVSPSAJobPSPLine"; var TempJobPSPLine: Record "KVSPSAJobPSPLine" temporary; var IsOK: Boolean; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Report, Report::"KVSPSACreate SalesDoc from PSP", 'KVSPSAOnBeforeCheckForTemporaryPSPLine', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeCheckForTemporaryPSPLine(var JobPSPLine: Record "KVSPSAJobPSPLine"; var TempJobPSPLine: Record "KVSPSAJobPSPLine" temporary; var IsOK: Boolean; var IsHandled: Boolean)
begin
end;
Parameters:
JobPSPLine: PSP line under validation.TempJobPSPLine: Current temporary buffer.IsOK: Result flag (TRUE = accept line).IsHandled: Set TRUE to skip standard logic.
KVSPSAOnBeforeCopyPSAJobBudgetLineToSalesLine(Record Sales Line, Record KVSPSA Job Budget Line, Boolean) :#
Summary: Before copying a Job Budget Line to a Sales Line. Can suppress standard copy.
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeCopyPSAJobBudgetLineToSalesLine(var SalesLine: Record "Sales Line"; var JobBudgetLine: Record "KVSPSA Job Budget Line"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Report, Report::"KVSPSACreate SalesDoc from PSP", 'KVSPSAOnBeforeCopyPSAJobBudgetLineToSalesLine', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeCopyPSAJobBudgetLineToSalesLine(var SalesLine: Record "Sales Line"; var JobBudgetLine: Record "KVSPSA Job Budget Line"; var IsHandled: Boolean)
begin
end;
Parameters:
SalesLine: Target (initialised) sales line.JobBudgetLine: Source job budget line.IsHandled: Set TRUE to skip standard copy logic.
KVSPSAOnBeforeCopyPSPLineToSalesLine(Record Sales Line, Record KVSPSAJobPSPLine, Boolean) :#
Summary: Before copying a PSP (WBS) line to the Sales Line.
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeCopyPSPLineToSalesLine(var SalesLine: Record "Sales Line"; var JobPSPLine: Record "KVSPSAJobPSPLine"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Report, Report::"KVSPSACreate SalesDoc from PSP", 'KVSPSAOnBeforeCopyPSPLineToSalesLine', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeCopyPSPLineToSalesLine(var SalesLine: Record "Sales Line"; var JobPSPLine: Record "KVSPSAJobPSPLine"; var IsHandled: Boolean)
begin
end;
Parameters:
SalesLine: Target sales line.JobPSPLine: Source PSP line.IsHandled: TRUE skips standard logic.
KVSPSAOnBeforeCreateSalesLineEndTotal(Record Sales Line, Record KVSPSAJobPSPLine, Boolean) :#
Summary: Before creating the end-total / subtotal closing sales line.
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeCreateSalesLineEndTotal(var SalesLine: Record "Sales Line"; var JobPSPLine: Record "KVSPSAJobPSPLine"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Report, Report::"KVSPSACreate SalesDoc from PSP", 'KVSPSAOnBeforeCreateSalesLineEndTotal', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeCreateSalesLineEndTotal(var SalesLine: Record "Sales Line"; var JobPSPLine: Record "KVSPSAJobPSPLine"; var IsHandled: Boolean)
begin
end;
Parameters:
SalesLine: Planned closing sales line.JobPSPLine: Associated PSP end-total line.IsHandled: TRUE = skip standard creation.
KVSPSAOnBeforeModifySalesHeader(Record Sales Header, Record Job) :#
Summary: Before modifying (saving) the newly created sales header. Adjust header fields here.
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeModifySalesHeader(var SalesHeader: Record "Sales Header"; Job: Record "Job"):
[EventSubscriber(ObjectType::Report, Report::"KVSPSACreate SalesDoc from PSP", 'KVSPSAOnBeforeModifySalesHeader', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeModifySalesHeader(var SalesHeader: Record "Sales Header"; Job: Record "Job")
begin
end;
Parameters:
SalesHeader: Sales header about to be modified.Job: Job context.
KVSPSAOnTestJobPSPWorkPackageLine(Record KVSPSAJobPSPHeader, Enum Sales Document Type, Record KVSPSAJobPSPLine, Record KVSPSA Job Budget Line, Record KVSPSAJobPSPLine) :#
[IntegrationEvent(false, false)]
local procedure KVSPSAOnTestJobPSPWorkPackageLine(KVSPSAJobPSPHeader: Record "KVSPSAJobPSPHeader"; SalesDocumentType: Enum "Sales Document Type"; TestJobPSPLine: Record "KVSPSAJobPSPLine"; TestJobBudgetLine: Record "KVSPSA Job Budget Line"; var TempJobPSPLine: Record "KVSPSAJobPSPLine" temporary):
[EventSubscriber(ObjectType::Report, Report::"KVSPSACreate SalesDoc from PSP", 'KVSPSAOnTestJobPSPWorkPackageLine', '', false, false)]
local procedure DoSomethingKVSPSAOnTestJobPSPWorkPackageLine(KVSPSAJobPSPHeader: Record "KVSPSAJobPSPHeader"; SalesDocumentType: Enum "Sales Document Type"; TestJobPSPLine: Record "KVSPSAJobPSPLine"; TestJobBudgetLine: Record "KVSPSA Job Budget Line"; var TempJobPSPLine: Record "KVSPSAJobPSPLine" temporary)
begin
end;
KVSPSAOnFillJobPSPWorkPackageLine(Record KVSPSAJobPSPHeader, Enum Sales Document Type, Record KVSPSAJobPSPLine, Record KVSPSA Job Budget Line, Record KVSPSAJobPSPLine) :#
[IntegrationEvent(false, false)]
local procedure KVSPSAOnFillJobPSPWorkPackageLine(KVSPSAJobPSPHeader: Record "KVSPSAJobPSPHeader"; SalesDocumentType: Enum "Sales Document Type"; JobPSPLine: Record "KVSPSAJobPSPLine"; JobBudgetLine: Record "KVSPSA Job Budget Line"; var TempJobPSPLine: Record "KVSPSAJobPSPLine" temporary):
[EventSubscriber(ObjectType::Report, Report::"KVSPSACreate SalesDoc from PSP", 'KVSPSAOnFillJobPSPWorkPackageLine', '', false, false)]
local procedure DoSomethingKVSPSAOnFillJobPSPWorkPackageLine(KVSPSAJobPSPHeader: Record "KVSPSAJobPSPHeader"; SalesDocumentType: Enum "Sales Document Type"; JobPSPLine: Record "KVSPSAJobPSPLine"; JobBudgetLine: Record "KVSPSA Job Budget Line"; var TempJobPSPLine: Record "KVSPSAJobPSPLine" temporary)
begin
end;
KVSPSAOnBeforeCheckIfSkipCreationOfSalesLineForBudgetLine(Record KVSPSA Job Budget Line, Boolean) :#
Summary: This event is raised before checking if creation of sales line should be skipped for current job budget line. The event can be used to avoid that a job budget line is skipped.
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeCheckIfSkipCreationOfSalesLineForBudgetLine(JobBudgetLine: Record "KVSPSA Job Budget Line"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Report, Report::"KVSPSACreate SalesDoc from PSP", 'KVSPSAOnBeforeCheckIfSkipCreationOfSalesLineForBudgetLine', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeCheckIfSkipCreationOfSalesLineForBudgetLine(JobBudgetLine: Record "KVSPSA Job Budget Line"; var IsHandled: Boolean)
begin
end;
Parameters:
JobBudgetLine: Current Job Budget LineIsHandled: Set to true to avoid that current job budget line is skipped
KVSPSAOnAfterSetJobPSPLineOptionFilters(Record KVSPSAJobPSPLine) :#
Summary: This event is raised after setting filters on PSP-Line. That event can be used to add additional filters.
[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterSetJobPSPLineOptionFilters(var JobPSPLine: Record "KVSPSAJobPSPLine"):
[EventSubscriber(ObjectType::Report, Report::"KVSPSACreate SalesDoc from PSP", 'KVSPSAOnAfterSetJobPSPLineOptionFilters', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterSetJobPSPLineOptionFilters(var JobPSPLine: Record "KVSPSAJobPSPLine")
begin
end;
Parameters:
JobPSPLine: Job PSP-Line that can be filtered
Protected Variables#
GlobalJob#
Type: Record Job
GlobalSalesHeader#
Type: Record Sales Header
GlobalActualQuoteNo#
Type: Code[20]
GlobalCustomDocumentNo#
Type: Code[20]
GlobalSalesDocumentType#
Type: Enum Sales Document Type
GlobalNextLineNo#
Type: Integer