Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,7 @@ codeunit 20404 "Qlty. Inspection - Create"
/// Creates inspection lines and result conditions from the header's template and evaluates the new lines.
/// </summary>
/// <param name="QltyInspectionHeader">The inspection for which to create lines.</param>
[CommitBehavior(CommitBehavior::Ignore)]
local procedure CreateQualityInspectionResultLinesFromTemplate(var QltyInspectionHeader: Record "Qlty. Inspection Header")
var
QltyInspectionTemplateLine: Record "Qlty. Inspection Template Line";
Expand All @@ -680,6 +681,7 @@ codeunit 20404 "Qlty. Inspection - Create"
QltyInspectionLine.Description := QltyInspectionTemplateLine.Description;
QltyInspectionLine."Allowable Values" := QltyInspectionTemplateLine."Allowable Values";
QltyInspectionLine."Unit of Measure Code" := QltyInspectionTemplateLine."Unit of Measure Code";
OnCreateQualityInspectionResultLinesFromTemplateOnBeforeInsertQltyInspectionLine(QltyInspectionLine, QltyInspectionTemplateLine);
QltyInspectionLine.Insert();
QltyResultConditionMgmt.CopyResultConditionsFromTemplateToInspection(QltyInspectionTemplateLine, QltyInspectionLine);
QltyInspectionHeader.SetPreventAutoAssignment(true);
Expand Down Expand Up @@ -1264,6 +1266,16 @@ codeunit 20404 "Qlty. Inspection - Create"

#endregion Event Subscribers

/// <summary>
/// Raised before a quality inspection line created from a template line is inserted.
/// </summary>
/// <param name="QltyInspectionLine">The quality inspection line to be inserted.</param>
/// <param name="QltyInspectionTemplateLine">The source quality inspection template line.</param>
[IntegrationEvent(false, false)]
local procedure OnCreateQualityInspectionResultLinesFromTemplateOnBeforeInsertQltyInspectionLine(var QltyInspectionLine: Record "Qlty. Inspection Line"; QltyInspectionTemplateLine: Record "Qlty. Inspection Template Line")
begin
end;

/// <summary>
/// OnBeforeCreateInspection is called before an inspection is created.
/// Use this event to do additional checks before an inspection is created.
Expand Down
Loading