Table of Contents

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 Reference
  • xJob: 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 Reference
  • xJob: 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"): 

Parameters:

  • Job: The job record that was created from template
  • JobTemplate: The job template that was applied

KVSPSAOnBeforeAssignLocationCodeToJob(Record Job, Code[10], Boolean) :

Summary: Allows control of the location, that is filled in the job. You can change the location code, or skip the function with the ishandled pattern

[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeAssignLocationCodeToJob(var Job: Record "Job"; var LocationCode: Code[10]; var IsHandled: Boolean): 

Parameters:

  • Job:
  • LocationCode:
  • IsHandled:

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): 

Parameters:

  • JobNo: The job number for the target job
  • JobTemplateCode: The code of the job template
  • IsHandled: 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): 

Parameters:

  • JobNo: The job number for the target job
  • JobTemplateCode: The code of the job template
  • IsHandled: 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): 

Parameters:

  • Job: The target job record
  • JobTemplateCode: The code of the job template
  • IsHandled: 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): 

Parameters:

  • JobTemplate: The job template being used
  • Job: The job record being created
  • xJob: The existing job record for reference
  • IsHandled: 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"): 

Parameters:

  • Job: The job record receiving the copied fields
  • JobTemplate: The job template providing the source fields