KVSPSACreate Job With Template#
Procedures#
CreateJob(Record Job, Record Job, Code[20]) :#
Summary: The procedure CreateJob creates a new job record based on the provided job template code. It initializes the job with values from the template, copies dimensions, evaluation books, and texts from the template, and sets up distribution if applicable.
procedure CreateJob(var Job: Record "Job"; xJob: Record "Job"; JobTemplateCode: Code[20]):
Parameters:
Job
: The job record to be created. Call by ReferencexJob
: An existing job record that may contain additional information.JobTemplateCode
: The code of the job template to be used for creating the job.
CreateJob(Record Job, Record Job, Code[20], Boolean) :#
Summary: The procedure CreateJob creates a new job record based on the provided job template code. It initializes the job with values from the template, copies dimensions, evaluation books, and texts from the template, and sets up distribution if applicable. If SkipCopyTextsFromTemplate is true, it will not copy texts from the template.
procedure CreateJob(var Job: Record "Job"; xJob: Record "Job"; JobTemplateCode: Code[20]; SkipCopyTextsFromTemplate: Boolean):
Parameters:
Job
: The job record to be created. Call by ReferencexJob
: An existing job record that may contain additional information.JobTemplateCode
: The code of the job template to be used for creating the job.SkipCopyTextsFromTemplate
: If true, texts from the template will not be copied.
Events#
KVSPSAOnAfterAppliedTemplateToJob(Record Job, Record KVSPSAJob Template) :#
Summary: Integration event raised after applying template to job during job creation
[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterAppliedTemplateToJob(var Job: Record "Job"; JobTemplate: Record "KVSPSAJob Template"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSACreate Job With Template", 'KVSPSAOnAfterAppliedTemplateToJob', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterAppliedTemplateToJob(var Job: Record "Job"; JobTemplate: Record "KVSPSAJob Template")
begin
end;
Parameters:
Job
: The job record that was created from templateJobTemplate
: The job template that was applied
KVSPSAOnBeforeCopyDimensionsFromTmplate(Code[20], Code[20], Boolean) :#
Summary: Integration event raised before copying dimensions from template to job
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeCopyDimensionsFromTmplate(JobNo: Code[20]; JobTemplateCode: Code[20]; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSACreate Job With Template", 'KVSPSAOnBeforeCopyDimensionsFromTmplate', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeCopyDimensionsFromTmplate(JobNo: Code[20]; JobTemplateCode: Code[20]; var IsHandled: Boolean)
begin
end;
Parameters:
JobNo
: The job number for the target jobJobTemplateCode
: The code of the job templateIsHandled
: Set to true if the operation is handled by subscriber
KVSPSAOnBeforeCopyEvalBooksFromTmplate(Code[20], Code[20], Boolean) :#
Summary: Integration event raised before copying evaluation books from template to job
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeCopyEvalBooksFromTmplate(JobNo: Code[20]; JobTemplateCode: Code[20]; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSACreate Job With Template", 'KVSPSAOnBeforeCopyEvalBooksFromTmplate', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeCopyEvalBooksFromTmplate(JobNo: Code[20]; JobTemplateCode: Code[20]; var IsHandled: Boolean)
begin
end;
Parameters:
JobNo
: The job number for the target jobJobTemplateCode
: The code of the job templateIsHandled
: Set to true if the operation is handled by subscriber
KVSPSAOnBeforeCopyTextsFromTmplate(Record Job, Code[20], Boolean) :#
Summary: Integration event raised before copying texts from template to job
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeCopyTextsFromTmplate(var Job: Record "Job"; JobTemplateCode: Code[20]; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSACreate Job With Template", 'KVSPSAOnBeforeCopyTextsFromTmplate', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeCopyTextsFromTmplate(var Job: Record "Job"; JobTemplateCode: Code[20]; var IsHandled: Boolean)
begin
end;
Parameters:
Job
: The target job recordJobTemplateCode
: The code of the job templateIsHandled
: Set to true if the operation is handled by subscriber
KVSPSAOnBeforeInitNoSeries(Record KVSPSAJob Template, Record Job, Record Job, Boolean) :#
Summary: Integration event raised before initializing number series for job creation
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeInitNoSeries(var JobTemplate: Record "KVSPSAJob Template"; var Job: Record "Job"; xJob: Record "Job"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSACreate Job With Template", 'KVSPSAOnBeforeInitNoSeries', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeInitNoSeries(var JobTemplate: Record "KVSPSAJob Template"; var Job: Record "Job"; xJob: Record "Job"; var IsHandled: Boolean)
begin
end;
Parameters:
JobTemplate
: The job template being usedJob
: The job record being createdxJob
: The existing job record for referenceIsHandled
: Set to true if the operation is handled by subscriber
KVSPSAOnCopyFieldsFromTemplate(Record Job, Record KVSPSAJob Template) :#
Summary: Integration event raised during field copying from template to job
[IntegrationEvent(false, false)]
local procedure KVSPSAOnCopyFieldsFromTemplate(var Job: Record "Job"; var JobTemplate: Record "KVSPSAJob Template"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSACreate Job With Template", 'KVSPSAOnCopyFieldsFromTemplate', '', false, false)]
local procedure DoSomethingKVSPSAOnCopyFieldsFromTemplate(var Job: Record "Job"; var JobTemplate: Record "KVSPSAJob Template")
begin
end;
Parameters:
Job
: The job record receiving the copied fieldsJobTemplate
: The job template providing the source fields