codeunitInventoryofficial - Microsoftderived - from the source, no model text

Codeunit 20404 "Qlty. Inspection - Create"

Quality Management · Microsoft.QualityManagement.Document

Across versions

  1. BC23-28not present
  2. BC29present
  3. BC30changed

Neighbourhood 18 connected objects and pages

Codeunit 20411 "Qlty. Receiving Integration" (calls, 15 links)Qlty. Receiving IntegrationCodeunit 20407 "Qlty. Manufactur. Integration" (calls, 5 links)Qlty. Manufactur. IntegrationCodeunit 20408 "Qlty. Traversal" (calls, 5 links)Page 20415 "Qlty. Create Inspection API" (calls, 4 links)Qlty. Create Inspection APICodeunit 20412 "Qlty. Assembly Integration" (calls, 3 links)Qlty. Assembly IntegrationCodeunit 20437 "Qlty. Notification Mgmt." (calls, 3 links)Qlty. Notification Mgmt.Codeunit 20438 "Qlty. Warehouse Integration" (calls, 3 links)Qlty. Warehouse IntegrationCodeunit 20599 "Qlty. Misc Helpers" (calls, 3 links)Codeunit 20405 "Qlty. Inspec. Gen. Rule Mgmt." (calls, 2 links)Qlty. Inspec. Gen. Rule Mgmt.Codeunit 20424 "Qlty. Workflow Response" (calls, 2 links)Qlty. Workflow ResponseCodeunit 20456 "Qlty. Batch Notif. Helper" (calls, 2 links)Qlty. Batch Notif. HelperCodeunit 701 "Data Type Management" (calls, 2 links)Data Type ManagementReport 20412 "Qlty. Schedule Inspection" (calls, 2 links)Qlty. Schedule InspectionCodeunit 20409 "Qlty. Result Condition Mgmt." (calls)Qlty. Result Condition Mgmt.Codeunit 20410 "Qlty. Result Evaluation" (calls)Qlty. Result EvaluationCodeunit 20428 "Qlty. Item Tracking" (calls)Qlty. Item TrackingCodeunit 99000845 "Reservation Management" (calls)Report 20400 "Qlty. Create Inspection" (calls)

Open in the neighbourhood explorer

One hop out, from the extracted relations and call graph. Up to 40 shown; the sections below list them all.

Quality Management · Microsoft.QualityManagement.Document · BC29-30 · source at ea08af5e · facts from BC29

Properties

Property Value
Permissions tabledata “Qlty. Management Setup” = r, tabledata “Qlty. Inspection Gen. Rule” = r, tabledata “Qlty. Inspection Header” = rim, tabledata “Qlty. Inspection Line” = rim, tabledata “Qlty. I. Result Condit. Conf.” = rim, tabledata “Qlty. Inspection Template Line” = r

Events published

  • OnBeforeCreateInspection(var TargetRecordRef: RecordRef; var IsManualCreation: Boolean; var OptionalSpecificTemplate: Code[20]; var IsHandled: Boolean; var OptionalRec2Variant: Variant; var OptionalRec3Variant: Variant) (integration): OnBeforeCreateInspection is called before an inspection is created. Use this event to do additional checks before an inspection is created.
  • OnAfterCreateInspectionBeforeDialog(var TargetRecordRef: RecordRef; var TriggeringRecordRef: RecordRef; var IsManualCreation: Boolean; var OptionalSpecificTemplate: Code[20]; var TempQltyInspectionGenRule: Record "Qlty. Inspection Gen. Rule" temporary; var QltyInspectionHeader: Record "Qlty. Inspection Header"; var OptionalRec2Variant: Variant; var OptionalRec3Variant: Variant) (integration): OnAfterCreateInspectionBeforeDialog gets called after a Quality Inspection has been created and before any interactive dialog is shown.
  • OnAfterCreateInspectionAfterDialog(var TargetRecordRef: RecordRef; var TriggeringRecordRef: RecordRef; var IsManualCreation: Boolean; var OptionalSpecificTemplate: Code[20]; var TempQltyInspectionGenRule: Record "Qlty. Inspection Gen. Rule" temporary; var QltyInspectionHeader: Record "Qlty. Inspection Header"; var OptionalRec2Variant: Variant; var OptionalRec3Variant: Variant) (integration): OnAfterCreateInspectionAfterDialog gets called after a Quality Inspection has been created after any interactive dialog is shown
  • OnCustomCreateInspectionBehavior(var TargetRecordRef: RecordRef; var OriginalTriggeringRecordRef: RecordRef; var TempQltyInspectionGenRule: Record "Qlty. Inspection Gen. Rule" temporary; var HasExistingInspection: Boolean; var PrecedingQltyInspectionHeader: Record "Qlty. Inspection Header"; var NeedNewInspection: Boolean; var ShouldCreateReinspection: Boolean) (integration): Implement OnCustomCreateInspectionBehavior if you have also extended enum 20402 “Qlty. Inspect. Creation Option” This is where you will provide any custom Inspection Creation Options to match your enum extension. Only set handled to true if you want to skip the remaining behavior.
  • OnBeforeCreateReinspection(var FromThisQltyInspectionHeader: Record "Qlty. Inspection Header"; var CreatedReQltyInspectionHeader: Record "Qlty. Inspection Header"; var IsHandled: Boolean) (integration): OnBeforeCreateReinspection supplies an opportunity to change how manual Re-inspections are performed.
  • OnAfterCreateReinspection(var FromThisQltyInspectionHeader: Record "Qlty. Inspection Header"; var CreatedReQltyInspectionHeader: Record "Qlty. Inspection Header") (integration): OnAfterCreateReinspection gives an opportunity to integrate with the re-inspection record after a manual re-inspection is created.
  • OnBeforeFindExistingInspection(TargetRecordRef: RecordRef; Optional2RecordRef: RecordRef; Optional3RecordRef: RecordRef; Optional4RecordRef: RecordRef; var QltyInspectionHeader: Record "Qlty. Inspection Header"; var Result: Boolean; var IsHandled: Boolean) (integration): OnBeforeFindExistingInspection provides an opportunity to override how an existing inspection is found.

Event subscriptions

  • HandleReservationManagementOnAfterSetReservSource subscribes to Codeunit “Reservation Management” OnAfterSetReservSource

Procedures

  • CreateInspectionWithVariant(ReferenceVariant: Variant; IsManualCreation: Boolean): Boolean (internal): Creates a quality inspection from a variant object using generation rule configuration. Automatically determines the most appropriate inspection template based on configured generation rules. The variant can be a Record, RecordRef, or RecordId. The procedure will: 1. Match against configured generat…
  • CreateInspectionWithVariantAndTemplate(ReferenceVariant: Variant; IsManualCreation: Boolean; OptionalSpecificTemplate: Code[20]): Boolean (internal): Creates a quality inspection from a variant object using a specified template. Bypasses automatic template selection and uses the provided template code directly. Use this when: - Template is predetermined (not rule-based selection) - Specific template is required regardless of generation rules - Ma…
  • CreateInspectionWithMultiVariants(OptionalRec1Variant: Variant; OptionalRec2Variant: Variant; OptionalRec3Variant: Variant; OptionalRec4Variant: Variant; IsManualCreation: Boolean; var TempFiltersQltyInspectionGenRule: Record "Qlty. Inspection Gen. Rule" temporary): Boolean (internal): Creates an inspection using multiple variant records, attempting each in sequence until successful. Allows filtering generation rules by auto inspection creation trigger through the provided generation rule record. Creation strategy: 1. Try creating inspection from OptionalRec1Variant with others as…
  • CreateInspectionWithMultiVariantsAndTemplate(OptionalRec1Variant: Variant; OptionalRec2Variant: Variant; OptionalRec3Variant: Variant; OptionalRec4Variant: Variant; IsManualCreation: Boolean; OptionalSpecificTemplate: Code[20]): Boolean (internal): Tries each supplied record variant as the primary source until an inspection is created with the specified template.
  • CreateInspection(TargetRecordRef: RecordRef; IsManualCreation: Boolean): Boolean (internal): Creates an inspection for a record reference using matching generation-rule configuration. Use this to create a quality inspection for any given record. The generation rule configuration will be used to find the most appropriate inspection to create.
  • CreateInspectionWithSpecificTemplate(TargetRecordRef: RecordRef; IsManualCreation: Boolean; OptionalSpecificTemplate: Code[20]): Boolean (internal): Creates an inspection for a record reference using a specific template. If you do not know which template you need, use CreateInspection. If you do know which template you need, then use this procedure. The caller must know in advance that the template and configuration is correct.
  • FindExistingInspectionWithVariant(RaiseErrorIfNoRuleIsFound: Boolean; ReferenceVariant: Variant; var QltyInspectionHeader: Record "Qlty. Inspection Header"): Boolean (internal): Finds existing inspections for a primary source record variant.
  • FindExistingInspectionWithMultipleVariants(RaiseErrorIfNoRuleIsFound: Boolean; ReferenceVariant: Variant; OptionalVariant2: Variant; OptionalVariant3: Variant; OptionalVariant4: Variant; var QltyInspectionHeader: Record "Qlty. Inspection Header"): Boolean (internal): Finds existing inspections using a primary source variant and up to three related source variants.
  • FindExistingInspection(RaiseErrorIfNoRuleIsFound: Boolean; TargetRecordRef: RecordRef; Optional2RecordRef: RecordRef; Optional3RecordRef: RecordRef; Optional4RecordRef: RecordRef; var QltyInspectionHeader: Record "Qlty. Inspection Header"): Boolean (internal): Finds and marks inspections matching generation rules and the supplied source records.
  • FindExistingInspectionWithVariant(TargetRecordRef: RecordRef; OptionalVariant2: Variant; OptionalVariant3: Variant; OptionalVariant4: Variant; TempQltyInspectionGenRule: Record "Qlty. Inspection Gen. Rule" temporary; var PrecedingQltyInspectionHeader: Record "Qlty. Inspection Header"; FindAll: Boolean): Boolean (internal): Finds inspections matching a primary source record, optional source variants, and a generation rule.
  • FindExistingInspection(TargetRecordRef: RecordRef; Optional2RecordRef: RecordRef; Optional3RecordRef: RecordRef; Optional4RecordRef: RecordRef; TempQltyInspectionGenRule: Record "Qlty. Inspection Gen. Rule" temporary; var PrecedingQltyInspectionHeader: Record "Qlty. Inspection Header"; FindAll: Boolean): Boolean (internal): Finds inspections matching up to four source records and a generation rule.
  • CreateReinspection(FromThisQltyInspectionHeader: Record "Qlty. Inspection Header"; var CreatedReinspectionQltyInspectionHeader: Record "Qlty. Inspection Header") (internal): Creates the next reinspection from the latest inspection with the same number.
  • GetCreatedInspection(var LastCreatedQltyInspectionHeader2: Record "Qlty. Inspection Header"): Boolean (internal): Gets the inspection resolved by the latest creation call on this codeunit instance. Only use if you just called one of the CreateInspection() procedures.
  • GetLastCreatedStatus(): Enum "Qlty. Inspection Create Status" (internal): Gets the status from the latest inspection creation attempt.
  • IsLastInspectionNewlyCreated(): Boolean (internal): Determines whether the latest resolved inspection was newly inserted rather than reused.
  • CreateMultipleInspectionsForMarkedTrackingSpecification(var TempTrackingSpecification: Record "Tracking Specification" temporary) (internal): Creates inspections for the marked temporary tracking specifications as a manual operation.
  • CreateMultipleInspectionsForMarkedTrackingSpecification(var TempTrackingSpecification: Record "Tracking Specification" temporary; IsManualCreation: Boolean) (internal): Creates inspections for the marked temporary tracking specifications.
  • CreateMultipleInspectionsForMultipleRecords(var SetOfRecordsRecordRef: RecordRef; IsManualCreation: Boolean) (internal): Creates inspections for a set of records without generation-rule filters.
  • CreateMultipleInspectionsForMultipleRecords(var SetOfRecordsRecordRef: RecordRef; IsManualCreation: Boolean; var TempFiltersQltyInspectionGenRule: Record "Qlty. Inspection Gen. Rule" temporary) (internal): Creates or resolves inspections for a set of records and displays manual results when appropriate.
  • DisplayInspectionsIfConfigured(IsManualCreation: Boolean; var ToDisplayQltyInspectionIds: List of [Code[20]]) (internal): Shows one or more resolved inspections, falling back to notifications when pages cannot be opened or filters are too long.
  • CreateMultipleInspectionsWithoutDisplaying(var SetOfRecordsRecordRef: RecordRef; IsManualCreation: Boolean; var TempFiltersQltyInspectionGenRule: Record "Qlty. Inspection Gen. Rule" temporary; var NewlyCreatedQltyInspectionIds: List of [Code[20]]; var AllResolvedQltyInspectionIds: List of [Code[20]]) (internal): Resolves inspections for multiple records without displaying them and separates new from reused inspections.
  • SetPreventDisplayingInspectionEvenIfConfigured(PreventDisplayingInspectionEvenIfConfigured: Boolean) (internal): Sets whether generated inspections should remain hidden even when setup would display them.

Plus 13 local procedures.

Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an Object::"Name" argument. Interface dispatch and calls through events are not counted, so the list is not complete.

Called by

Recent changes

Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: bcatlas_resolve_node(object_type: "codeunit", object_name: "Qlty. Inspection - Create"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.

Evidence 1 sources