Understanding Test Generation Rules and Source Configuration in Quality Inspector

Skip to main content

Understanding Test Generation Rules and Source Configuration in Quality Inspector

You are here:

Quality Inspector uses Test Generation Rules and Source Configuration together when creating Quality Inspection Tests.

These two configuration areas have different responsibilities:

  • Test Generation Rules determine which Quality Inspection Template should be used for a record and under what conditions.
  • Source Configuration determines how Business Central records are connected to Quality Inspector and what information from those records is added to the Quality Inspection Test.

Understanding this distinction can make it much easier to configure new inspection scenarios and troubleshoot tests that are missing expected source information.

How the pieces work together

At a high level, Quality Inspector uses the following process:

Business Central record → Test Generation Rule → Quality Inspection Template → Source Configuration → Quality Inspection Test

For example, when receiving an item on a Purchase Line:

  1. A Business Central process provides a Purchase Line as a possible source for a Quality Inspection Test.
  2. Quality Inspector evaluates Test Generation Rules that apply to the Purchase Line.
  3. The applicable Test Generation Rule determines which Quality Inspection Template to use.
  4. Source Configuration determines which Purchase Line fields are copied to the Quality Inspection Test.
  5. Source Configuration can also connect the Purchase Line to related records when additional information is needed.
  6. Quality Inspector creates or finds the appropriate Quality Inspection Test according to the configured Quality Inspector Setup behavior.

The important distinction is that the Test Generation Rule selects the inspection, while Source Configuration supplies and relates the source information used by the inspection.

What is a Test Generation Rule?

A Quality Inspection Test Generation Rule connects a Quality Inspection Template to a Business Central source table and defines the circumstances in which that template applies.

A Test Generation Rule can specify information such as:

  • Quality Inspection Template
  • Source table
  • Condition Filter
  • Item Filter
  • Attribute Filter
  • Activation behavior
  • Automatic triggers for supported processes such as purchasing, warehouse receiving, production, assembly, transfers, or sales returns

For example, you might create a rule that means:

Use the RECEIVING inspection template for Purchase Lines where the item is 1000.

Or:

Use a specific inspection template when receiving items from a particular item category.

When multiple Test Generation Rules could apply, Quality Inspector evaluates them using their configured sort order and uses the first applicable template.

Test Generation Rules answer the question:

“Which inspection should I perform for this record?”

They do not define how Purchase Line fields such as Document No., Item No., Quantity, or Variant Code are populated on the resulting Quality Inspection Test. That is the role of Source Configuration.

What is Source Configuration?

Source Configuration defines how a Business Central table participates in Quality Inspector.

A Source Configuration can be used to:

  • Map fields from a Business Central record to fields on a Quality Inspection Test.
  • Define how one Business Central table is related to another table.
  • Retrieve additional source information from related records.
  • Make additional related records available when Quality Inspector evaluates inspection rules and creates tests.

For example, a Purchase Line Source Configuration might map:

Purchase Line field Quality Inspection Test field
Document No. Source Document No.
Line No. Source Document Line No.
No. Source Item No.
Variant Code Source Variant Code
Description Source Description
Quantity information Source Quantity

The exact mappings available depend on the source being configured.

Source Configuration answers the question:

“How does Quality Inspector understand this Business Central record, and what information should it bring into the test?”

Direct Source Configuration

The simplest Source Configuration maps a Business Central table directly to a Quality Inspection Test.

For example:

Purchase Line → Quality Inspection Test

The Source Configuration identifies:

  • From Table: Purchase Line
  • To Type: Test
  • To Table: Quality Inspection Test

The configuration lines then identify which fields should be copied from the Purchase Line to the Quality Inspection Test.

This allows Quality Inspector to create a test from a Purchase Line and populate the source information required by the test.

Chained Source Configuration

Sometimes the record used to create a Quality Inspection Test does not contain all the information needed to determine which inspection applies or what information should appear on the test.

Quality Inspector can use Chained Table Source Configurations to connect related Business Central records.

For example, Quality Inspector could have relationships similar to:

Warehouse Receipt Line → Purchase Line → Quality Inspection Test

The Warehouse Receipt Line may be the record available during the warehouse process, while the related Purchase Line contains additional purchasing information.

A chained Source Configuration tells Quality Inspector how those records are related.

Chaining can also be used to reach other related information.

Examples include:

  • Connecting a production routing record to its Production Order Line to obtain the Item No.
  • Connecting to an Item record to use item-specific information.
  • Connecting to customer information for customer-specific inspection requirements.
  • Connecting to related records containing information that is not directly available on the original source record.

This allows Test Generation Rules and Quality Inspection Tests to use useful business information without requiring every value to exist directly on the record that initiated the inspection.

Example: receiving inspections

A standard receiving configuration can include several related Source Configurations.

For example:

Purchase Line → Quality Inspection Test

This supplies information from the Purchase Line to the Quality Inspection Test.

Additional configurations can connect warehouse or tracking records to the Purchase Line, such as:

Warehouse Receipt Line → Purchase Line

or other supported receiving and tracking relationships.

A Test Generation Rule can then be configured against the appropriate source table and select a receiving template based on conditions such as the item being received.

The Test Generation Rule determines whether the receiving template applies.

The Source Configuration determines how Quality Inspector obtains and populates the source information for that test.

Source Configuration fields

When reviewing a Source Configuration, several fields are particularly important.

From Table

The Business Central table from which Quality Inspector is obtaining information.

Examples include:

  • Purchase Line
  • Warehouse Receipt Line
  • Production Order Line
  • Production Order Routing Line
  • Work Center

From Table Filter

Optional criteria that restrict when the Source Configuration is applicable.

For example, a Purchase Line configuration can be restricted to lines where the Type is Item.

The filter belongs to the relationship or mapping itself. It is different from the Condition Filter on a Test Generation Rule.

To Type

The To Type describes how the source record is being used.

Two important concepts are:

Test

The source table maps information directly to a Quality Inspection Test.

Chained Table

The source table is connected to another Business Central table so Quality Inspector can traverse between related records.

Some standard Quality Inspector configurations also use specialized relationships for item tracking scenarios. These should normally be created and maintained using the standard Quality Inspector setup and supported configuration rather than recreated unnecessarily.

Source Configuration Lines

The lines define individual field relationships.

For a configuration that maps to a test, a line specifies:

From Field → Quality Inspection Test field

For a chained relationship, the lines specify the fields Quality Inspector uses to connect records between the two tables.

For example, a relationship between two records could use document number and document line number fields to locate the corresponding record.

Test Generation Rule filters versus Source Configuration filters

It is important not to confuse these two types of filtering.

Test Generation Rule filters

These determine whether a Quality Inspection Template applies.

Example:

Use the RECEIVING template only when the Item No. is 1000.

Source Configuration filters

These determine whether a particular relationship or mapping applies.

Example:

This Purchase Line Source Configuration applies only to Purchase Lines where Type = Item.

A useful way to remember the difference is:

Generation Rule filter = Should this inspection be used?

Source Configuration filter = Is this source relationship applicable?

Source Record and Trigger Record

A Quality Inspection Test can contain both source and trigger information.

The Source Record identifies the Business Central record the Quality Inspection Test is associated with.

The Trigger Record identifies the record or process that caused the Quality Inspection Test creation process to run.

These can be the same record, but they do not have to be.

This distinction is useful in processes where one Business Central record initiates test creation while Source Configuration connects Quality Inspector to another related record that represents the inspection source.

When should I change a Test Generation Rule?

Review or change a Test Generation Rule when the requirement is about:

  • Which Quality Inspection Template should be used.
  • Which items should receive a particular inspection.
  • Which records should qualify for an inspection.
  • Whether a rule should be available manually or automatically.
  • When an inspection should be triggered in a supported Business Central process.
  • The precedence of one inspection rule compared with another.

For example:

“Item 1000 should use a different receiving inspection.”

This is primarily a Test Generation Rule requirement.

When should I change Source Configuration?

Review Source Configuration when the requirement is about:

  • Missing source information on a Quality Inspection Test.
  • Mapping a field from a Business Central record to the test.
  • Creating tests from a new source table.
  • Connecting the source record to another Business Central table.
  • Making related information available to Quality Inspector.
  • Changing how Quality Inspector relates records during test creation.

For example:

“The inspection is being created, but the Item No. is not populated.”

This is likely a Source Configuration issue rather than a Test Generation Rule issue.

Another example:

“I need a test created from this custom table.”

This requires a Source Configuration that allows Quality Inspector to use that table as a source, in addition to an appropriate Test Generation Rule.

Troubleshooting checklist

If a Quality Inspection Test is not being created, first check the Test Generation Rule:

  1. Is the rule enabled for the required activation method?
  2. Is the correct source table selected?
  3. Does the source record satisfy the Condition Filter?
  4. Does it satisfy the Item or Attribute filters, if configured?
  5. Is the expected automatic trigger configured?
  6. If multiple rules apply, is the intended rule in the correct sort order?

If the Quality Inspection Test is created but contains missing or unexpected source information, check Source Configuration:

  1. Does an enabled Source Configuration exist for the source table?
  2. Are the required fields mapped to the appropriate Quality Inspection Test fields?
  3. Does the From Table Filter apply to the source record?
  4. If information comes from another table, is the required chained Source Configuration present?
  5. Do the configured fields correctly identify the related record?
  6. Has a standard Source Configuration been modified or disabled?

Use the standard configuration where possible

The Quality Inspector Setup Wizard creates Source Configuration required for many standard Business Central processes.

Before creating or significantly changing Source Configuration, review the existing configuration. Standard configurations can include relationships between purchasing, warehouse, production, and item-tracking records that are required for other Quality Inspector functionality.

For common receiving and production scenarios, it is generally better to start with the standard configuration and create the required Test Generation Rules rather than replacing the standard Source Configuration.

Custom Source Configuration is most appropriate when:

  • Quality Inspector needs to support a custom Business Central table.
  • Additional related information is required.
  • A standard relationship does not provide the information required for the business process.

Summary

Test Generation Rules and Source Configuration work together, but they solve different problems.

Test Generation Rules

  • Select the Quality Inspection Template.
  • Define when that template applies.
  • Can define manual or automatic activation behavior.
  • Can filter inspections based on the applicable source and related information.

Source Configuration

  • Defines which Business Central tables Quality Inspector can use.
  • Maps source fields to Quality Inspection Test fields.
  • Defines relationships between Business Central tables.
  • Allows Quality Inspector to retrieve information through related records.

When troubleshooting Quality Inspector, first determine which question you are trying to answer:

“Why was this inspection selected or not selected?”

Start with the Test Generation Rule.

“Why does this test contain, or not contain, this source information?”

Start with Source Configuration.

Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.
Need help?

Leave A Comment

Table of Contents
Go to Top