KVSPSACopy PSP Management#
Procedures#
CopyPSPHeaderComment(Record KVSPSAJobPSPHeader, Record KVSPSAJobPSPHeader) :#
Summary: The function copy the comment from the source PSP header to the target PSP header. It is used when copying a PSP header to another PSP header. The function will only copy the comment if the global variable GlobalIncludeHeaderComment is set to true. If the global variable is false, the function will exit without doing anything.
procedure CopyPSPHeaderComment(FromJobPSPHeader: Record "KVSPSAJobPSPHeader"; var ToJobPSPHeader: Record "KVSPSAJobPSPHeader"):
Parameters:
FromJobPSPHeader
: The Source Job PSP HeaderToJobPSPHeader
: The Target Job PSP Header. It is passed by call by reference.
CopyPSPHeaderText(Record KVSPSAJobPSPHeader, Record KVSPSAJobPSPHeader) :#
Summary: The function copy the text from the source PSP header to the target PSP header. It is used when copying a PSP header to another PSP header. The function will only copy the text if the global variable GlobalIncludeHeaderText is set to true. If the global variable is false, the function will exit without doing anything. The function will copy the text lines with the position "Previous Text" and "After Text".
procedure CopyPSPHeaderText(FromJobPSPHeader: Record "KVSPSAJobPSPHeader"; var ToJobPSPHeader: Record "KVSPSAJobPSPHeader"):
Parameters:
FromJobPSPHeader
: The Source Job PSP HeaderToJobPSPHeader
: The Target Job PSP Header. It is passed by call by reference.
CopyPSPLine(Record KVSPSAJobPSPLine, Record KVSPSAJobPSPLine, Integer, Date, Date) :#
Summary: The function copy the PSP line from the source PSP line to the target PSP line. It is used when copying a PSP line to another PSP line. The function will copy the fields from the source PSP line to the target PSP line. The function will also copy the comment, text, task links, milestone links, skills and budget line from the source PSP line to the target PSP line. The function will also update the amounts in the target PSP line. The function will also transfer the distribution if the global variable GlobalJobsSetup."KVSPSA Distribution Active" is set to true.
procedure CopyPSPLine(FromJobPSPLine: Record "KVSPSAJobPSPLine"; var ToJobPSPLine: Record "KVSPSAJobPSPLine"; NewLineNo: Integer; NewStartDate: Date; NewEndDate: Date):
Parameters:
FromJobPSPLine
: The Source Job PSP Line. It is passed by reference.ToJobPSPLine
: The Target Job PSP Line. It is passed by reference.NewLineNo
: The new line number for the target PSP line.NewStartDate
: The new starting date for the target PSP line. If 0D, the starting date will be calculated based on the global variable GlobalDateCalcForm.NewEndDate
: The new ending date for the target PSP line. If 0D, the ending date will be calculated based on the global variable GlobalDateCalcForm.
LinesClearCopyRelation(Record KVSPSAJobPSPHeader) :#
Summary: The function clears the copy relation for the PSP lines of a given Job PSP header. It sets the "Copy from Line No." field to 0 for all PSP lines that belong to the specified Job PSP header. This is useful when you want to remove the copy relation between PSP lines after copying or modifying them.
procedure LinesClearCopyRelation(JobPSPHeader: Record "KVSPSAJobPSPHeader"):
Parameters:
JobPSPHeader
: The Job PSP header for which the copy relation should be cleared.
SetJob(Record Job, Record Job) :#
Summary: The functioon is used to set the source and target Job records for the PSP copy management. It initializes the global variables GlobalFromJob and GlobalToJob with the provided Job records.
procedure SetJob(FromJob: Record "Job"; ToJob: Record "Job"):
Parameters:
FromJob
: The source Job record.ToJob
: The target Job record.
SetPSPHeader(Record KVSPSAJobPSPHeader, Record KVSPSAJobPSPHeader) :#
Summary: The function is used to set the source and target Job PSP header records for the PSP copy management. It initializes the global variables GlobalFromJobPSPHeader and GlobalToJobPSPHeader with the provided Job PSP header records.
procedure SetPSPHeader(var FromJobPSPHeader: Record "KVSPSAJobPSPHeader"; var ToJobPSPHeader: Record "KVSPSAJobPSPHeader"):
Parameters:
FromJobPSPHeader
: The source Job PSP header record.ToJobPSPHeader
: The target Job PSP header record.
Settings(DateFormula, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Option, Boolean, Boolean, Boolean, Boolean) :#
Summary: The function is used to set the settings for the PSP copy management. It initializes the global variables with the provided parameters.
procedure Settings(DateCalcForm: DateFormula; NewDim: Boolean; InclLinecomment: Boolean; IncludeHeaderComment: Boolean; InclLineText: Boolean; IncludeHeaderText: Boolean; InclTaskLinks: Boolean; InclBudgetLine: Boolean; InclLineBudgetText: Boolean; InclBudgetEntry: Boolean; UpdateStartEndDate: Boolean; UpdateCostandPrice: Option; IncludePSPSkill: Boolean; UpdateAutoActCode: Boolean; IgnoreFinishedBudLines: Boolean; CopyStructureOnly: Boolean):
Parameters:
DateCalcForm
: The date calculation formula to be used for date calculations.NewDim
: Indicates whether new dimensions should be created for the copied PSP lines.InclLinecomment
: Indicates whether line comments should be included in the copy.IncludeHeaderComment
: Indicates whether header comments should be included in the copy.InclLineText
: Indicates whether line text should be included in the copy.IncludeHeaderText
: Indicates whether header text should be included in the copy.InclTaskLinks
: Indicates whether task links should be included in the copy.InclBudgetLine
: Indicates whether budget lines should be included in the copy.InclLineBudgetText
: Indicates whether line budget text should be included in the copy.InclBudgetEntry
: Indicates whether budget entries should be included in the copy.UpdateStartEndDate
: Indicates whether the start and end dates should be updated during the copy.UpdateCostandPrice
: Indicates the type of cost and price update to be performed during the copy.IncludePSPSkill
: Indicates whether PSP skills should be included in the copy.UpdateAutoActCode
: Indicates whether the automatic activity code should be updated during the copy.IgnoreFinishedBudLines
: Indicates whether finished budget lines should be ignored during the copy.CopyStructureOnly
: Indicates whether only the structure should be copied without any data.
SetUseNewPhaseCode(Code[20]) :#
Summary: Set the use of new phase code for the PSP copy management. This procedure sets the global variable GlobalUseOwnPhaseCode to true and assigns the provided NewPhaseCode to GlobalNewPhaseCode.
procedure SetUseNewPhaseCode(NewPhaseCode: Code[20]):
Parameters:
NewPhaseCode
: The new phase code to be used for the PSP copy management.
SetUseNewStepCode(Code[20]) :#
Summary: Set the use of new step code for the PSP copy management. This procedure sets the global variable GlobalUseOwnStepCode to true and assigns the provided NewStepCode to GlobalNewStepCode.
procedure SetUseNewStepCode(NewStepCode: Code[20]):
Parameters:
NewStepCode
: The new step code to be used for the PSP copy management.
SetUseNewTaskCode(Code[20]) :#
Summary: Set the use of new task code for the PSP copy management. This procedure sets the global variable GlobalUseOwnTaskCode to true and assigns the provided NewTaskCode to GlobalNewTaskCode.
procedure SetUseNewTaskCode(NewTaskCode: Code[20]):
Parameters:
NewTaskCode
: The new task code to be used for the PSP copy management.
UpdatePSPMSLinks(Record KVSPSAJobPSPHeader) :#
Summary: The function updates the PSP line milestone links for a given Job PSP header. It checks the existing milestone links and compares them with the PSP lines of the Job PSP header.
procedure UpdatePSPMSLinks(JobPSPHeader: Record "KVSPSAJobPSPHeader"):
Parameters:
JobPSPHeader
: The PSP header where the related Milestones are linked
UpdatePSPTaskLinks(Record KVSPSAJobPSPHeader) :#
Summary: The function updates the PSP line task links for a given Job PSP header. It checks the existing task links and compares them with the PSP lines of the Job PSP header.
procedure UpdatePSPTaskLinks(JobPSPHeader: Record "KVSPSAJobPSPHeader"):
Parameters:
JobPSPHeader
: The PSP header where the related Tasks are linked
Events#
KVSPSAOnAfterCopiedBudgetLineOnPSPCopy(Record KVSPSA Job Budget Line, Record KVSPSA Job Budget Line) :#
[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterCopiedBudgetLineOnPSPCopy(var FromJobBudgetLine: Record "KVSPSA Job Budget Line"; var ToInsertedJobBudgetLine: Record "KVSPSA Job Budget Line"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSACopy PSP Management", 'KVSPSAOnAfterCopiedBudgetLineOnPSPCopy', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterCopiedBudgetLineOnPSPCopy(var FromJobBudgetLine: Record "KVSPSA Job Budget Line"; var ToInsertedJobBudgetLine: Record "KVSPSA Job Budget Line")
begin
end;
KVSPSAOnAfterCopiedPSPLineOnPSPCopy(Record KVSPSAJobPSPLine, Record KVSPSAJobPSPLine) :#
[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterCopiedPSPLineOnPSPCopy(var FromJobPSPLine: Record "KVSPSAJobPSPLine"; var ToJobPSPLine: Record "KVSPSAJobPSPLine"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSACopy PSP Management", 'KVSPSAOnAfterCopiedPSPLineOnPSPCopy', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterCopiedPSPLineOnPSPCopy(var FromJobPSPLine: Record "KVSPSAJobPSPLine"; var ToJobPSPLine: Record "KVSPSAJobPSPLine")
begin
end;
KVSPSAOnAfterCopyBudgetEntryFieldsOnPSPCopy(Record KVSPSA Job Budget Entry, Record KVSPSA Job Budget Entry) :#
[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterCopyBudgetEntryFieldsOnPSPCopy(var FromJobBudgetEntry: Record "KVSPSA Job Budget Entry"; var ToJobBudgetEntry: Record "KVSPSA Job Budget Entry"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSACopy PSP Management", 'KVSPSAOnAfterCopyBudgetEntryFieldsOnPSPCopy', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterCopyBudgetEntryFieldsOnPSPCopy(var FromJobBudgetEntry: Record "KVSPSA Job Budget Entry"; var ToJobBudgetEntry: Record "KVSPSA Job Budget Entry")
begin
end;
KVSPSAOnAfterCopyBudgetLineFieldsOnPSPCopy(Record KVSPSA Job Budget Line, Record KVSPSA Job Budget Line) :#
[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterCopyBudgetLineFieldsOnPSPCopy(var FromJobBudgetLine: Record "KVSPSA Job Budget Line"; var ToInsertedJobBudgetLine: Record "KVSPSA Job Budget Line"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSACopy PSP Management", 'KVSPSAOnAfterCopyBudgetLineFieldsOnPSPCopy', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterCopyBudgetLineFieldsOnPSPCopy(var FromJobBudgetLine: Record "KVSPSA Job Budget Line"; var ToInsertedJobBudgetLine: Record "KVSPSA Job Budget Line")
begin
end;
KVSPSAOnAfterCopyBudgetTaskLinkFieldsOnPSPCopy(Record KVSPSABudget Line Task Link, Record KVSPSABudget Line Task Link) :#
[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterCopyBudgetTaskLinkFieldsOnPSPCopy(var FromBudgetLineTaskLink: Record "KVSPSABudget Line Task Link"; var ToBudgetLineTaskLink: Record "KVSPSABudget Line Task Link"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSACopy PSP Management", 'KVSPSAOnAfterCopyBudgetTaskLinkFieldsOnPSPCopy', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterCopyBudgetTaskLinkFieldsOnPSPCopy(var FromBudgetLineTaskLink: Record "KVSPSABudget Line Task Link"; var ToBudgetLineTaskLink: Record "KVSPSABudget Line Task Link")
begin
end;
KVSPSAOnAfterCopyPSPCommentFieldsOnPSPCopy(Record KVSPSAPSPJobCommentLineText, Record KVSPSAPSPJobCommentLineText) :#
[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterCopyPSPCommentFieldsOnPSPCopy(var FromPSPJobCommentLineText: Record "KVSPSAPSPJobCommentLineText"; var ToPSPJobCommentLineText: Record "KVSPSAPSPJobCommentLineText"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSACopy PSP Management", 'KVSPSAOnAfterCopyPSPCommentFieldsOnPSPCopy', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterCopyPSPCommentFieldsOnPSPCopy(var FromPSPJobCommentLineText: Record "KVSPSAPSPJobCommentLineText"; var ToPSPJobCommentLineText: Record "KVSPSAPSPJobCommentLineText")
begin
end;
KVSPSAOnAfterCopyPSPLineFieldsOnPSPCopy(Record KVSPSAJobPSPLine, Record KVSPSAJobPSPLine) :#
[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterCopyPSPLineFieldsOnPSPCopy(var FromJobPSPLine: Record "KVSPSAJobPSPLine"; var ToJobPSPLine: Record "KVSPSAJobPSPLine"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSACopy PSP Management", 'KVSPSAOnAfterCopyPSPLineFieldsOnPSPCopy', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterCopyPSPLineFieldsOnPSPCopy(var FromJobPSPLine: Record "KVSPSAJobPSPLine"; var ToJobPSPLine: Record "KVSPSAJobPSPLine")
begin
end;
KVSPSAOnAfterCopyPSPMileStoneLinkFieldsOnPSPCopy(Record KVSPSAPSP Line Milestone Link, Record KVSPSAPSP Line Milestone Link) :#
[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterCopyPSPMileStoneLinkFieldsOnPSPCopy(var FromPSPLineMilestoneLink: Record "KVSPSAPSP Line Milestone Link"; var ToPSPLineMilestoneLink: Record "KVSPSAPSP Line Milestone Link"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSACopy PSP Management", 'KVSPSAOnAfterCopyPSPMileStoneLinkFieldsOnPSPCopy', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterCopyPSPMileStoneLinkFieldsOnPSPCopy(var FromPSPLineMilestoneLink: Record "KVSPSAPSP Line Milestone Link"; var ToPSPLineMilestoneLink: Record "KVSPSAPSP Line Milestone Link")
begin
end;
KVSPSAOnAfterCopyPSPSkillFieldsOnPSPCopy(Record KVSPSAPSP Line Skill, Record KVSPSAPSP Line Skill) :#
[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterCopyPSPSkillFieldsOnPSPCopy(var FromPSPLineSkill: Record "KVSPSAPSP Line Skill"; var ToPSPLineSkill: Record "KVSPSAPSP Line Skill"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSACopy PSP Management", 'KVSPSAOnAfterCopyPSPSkillFieldsOnPSPCopy', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterCopyPSPSkillFieldsOnPSPCopy(var FromPSPLineSkill: Record "KVSPSAPSP Line Skill"; var ToPSPLineSkill: Record "KVSPSAPSP Line Skill")
begin
end;
KVSPSAOnAfterCopyPSPTaskLinkFieldsOnPSPCopy(Record KVSPSAPSP Line Task Link, Record KVSPSAPSP Line Task Link) :#
[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterCopyPSPTaskLinkFieldsOnPSPCopy(var FromPSPLineTaskLink: Record "KVSPSAPSP Line Task Link"; var ToPSPLineTaskLink: Record "KVSPSAPSP Line Task Link"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSACopy PSP Management", 'KVSPSAOnAfterCopyPSPTaskLinkFieldsOnPSPCopy', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterCopyPSPTaskLinkFieldsOnPSPCopy(var FromPSPLineTaskLink: Record "KVSPSAPSP Line Task Link"; var ToPSPLineTaskLink: Record "KVSPSAPSP Line Task Link")
begin
end;
KVSPSAOnAfterCopyPSPTextFieldsOnPSPCopy(Record KVSPSAPSP Job Text Line, Record KVSPSAPSP Job Text Line) :#
[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterCopyPSPTextFieldsOnPSPCopy(var FromPSPJobTextLine: Record "KVSPSAPSP Job Text Line"; var ToPSPJobTextLine: Record "KVSPSAPSP Job Text Line"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSACopy PSP Management", 'KVSPSAOnAfterCopyPSPTextFieldsOnPSPCopy', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterCopyPSPTextFieldsOnPSPCopy(var FromPSPJobTextLine: Record "KVSPSAPSP Job Text Line"; var ToPSPJobTextLine: Record "KVSPSAPSP Job Text Line")
begin
end;
KVSPSAOnBeforeCopyBudgetEntryFieldsOnPSPCopy(Record KVSPSA Job Budget Entry, Record KVSPSA Job Budget Entry) :#
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeCopyBudgetEntryFieldsOnPSPCopy(var FromJobBudgetEntry: Record "KVSPSA Job Budget Entry"; var ToJobBudgetEntry: Record "KVSPSA Job Budget Entry"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSACopy PSP Management", 'KVSPSAOnBeforeCopyBudgetEntryFieldsOnPSPCopy', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeCopyBudgetEntryFieldsOnPSPCopy(var FromJobBudgetEntry: Record "KVSPSA Job Budget Entry"; var ToJobBudgetEntry: Record "KVSPSA Job Budget Entry")
begin
end;
KVSPSAOnBeforeCopyBudgetLineFieldsOnPSPCopy(Record KVSPSAJobPSPLine, Record KVSPSAJobPSPLine, Record KVSPSA Job Budget Line, Record KVSPSA Job Budget Line) :#
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeCopyBudgetLineFieldsOnPSPCopy(FromJobPSPLine: Record "KVSPSAJobPSPLine"; var ToJobPSPLine: Record "KVSPSAJobPSPLine"; var FromJobBudgetLine: Record "KVSPSA Job Budget Line"; var ToInsertedJobBudgetLine: Record "KVSPSA Job Budget Line"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSACopy PSP Management", 'KVSPSAOnBeforeCopyBudgetLineFieldsOnPSPCopy', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeCopyBudgetLineFieldsOnPSPCopy(FromJobPSPLine: Record "KVSPSAJobPSPLine"; var ToJobPSPLine: Record "KVSPSAJobPSPLine"; var FromJobBudgetLine: Record "KVSPSA Job Budget Line"; var ToInsertedJobBudgetLine: Record "KVSPSA Job Budget Line")
begin
end;
KVSPSAOnBeforeCopyBudgetTaskLinkFieldsOnPSPCopy(Record KVSPSABudget Line Task Link, Record KVSPSABudget Line Task Link) :#
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeCopyBudgetTaskLinkFieldsOnPSPCopy(var FromBudgetLineTaskLink: Record "KVSPSABudget Line Task Link"; var ToBudgetLineTaskLink: Record "KVSPSABudget Line Task Link"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSACopy PSP Management", 'KVSPSAOnBeforeCopyBudgetTaskLinkFieldsOnPSPCopy', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeCopyBudgetTaskLinkFieldsOnPSPCopy(var FromBudgetLineTaskLink: Record "KVSPSABudget Line Task Link"; var ToBudgetLineTaskLink: Record "KVSPSABudget Line Task Link")
begin
end;
KVSPSAOnBeforeGetNextEntryNoOnCopyBudgetEntry(Integer, Record KVSPSA Job Budget Line, Record KVSPSA Job Budget Line, Boolean) :#
Obsolete
This Element will be removed or changed with a future Version of the App.
[Obsolete('Not needed anymore since Rolling Planing is moved to product', '25.0')]
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeGetNextEntryNoOnCopyBudgetEntry(var NextEntryNo: Integer; FromJobBudgetLine: Record "KVSPSA Job Budget Line"; ToJobBudgetLine: Record "KVSPSA Job Budget Line"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSACopy PSP Management", 'KVSPSAOnBeforeGetNextEntryNoOnCopyBudgetEntry', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeGetNextEntryNoOnCopyBudgetEntry(var NextEntryNo: Integer; FromJobBudgetLine: Record "KVSPSA Job Budget Line"; ToJobBudgetLine: Record "KVSPSA Job Budget Line"; var IsHandled: Boolean)
begin
end;