**Source URL:** https://lims.veevavault.help/en/lr/1156800/

# Configuring Non-Routine & Ad Hoc Testing

Non-routine testing allows quality control analysts to perform *Tests* on *Samples* outside of the standard batch release process, based on an effective *Spec Data*. Ad hoc testing allows users to create *Samples*, *Tests*, and *Criteria* as needed to create their own combination of *Tests* for non-routine *Samples*.

In order to configure non-routine and ad hoc testing for use:

1. Activate the following:
    1. The *Non-Routine Request* object and object types
    2. The *Initiate Request* action on the *Non-Routine Request* object
    3. The *Non-Routine* object type for the *Spec Data* object
    4. The *Non-Routine* object type for the *Lab Sample* object
    5. The *Non-Routine Lab Sample* value for the *Non Conforming Sample Type* picklist 
2. Create a tab or page for *Non-Routine Requests* (`non_routine_testing__c`)
3. Create/Edit Permission Sets for the following objects:
    1. *Non-Routine Request:* Grant access to *Initiate Request* action
    2. *Spec Execution* (*Non-Routine* / *Ad Hoc*)
4. Make the following additions to the *Non-Routine Request* page layout:
    1. Add the *Spec Data* control to the page layout
    2. Add the *Sample Definitions* app section to the page layout
5. Make the following changes to the Lab Sample Lifecycle:
    1. Add *Non-Routine Spec Execution* to the *Deliver Sample* and *Receive Sample* user actions in the *Unreceived* state
    2. Add a default value for the *Non-Routine* object type for the name prefix in the *Spec Execution* object. 
6. Optional: Add a workflow for review and approval prior to the *Initiate Request* action
7. Optional: Lock *Spec Data Trace ID* (and other fields) after *Initiate Request* to prevent the *Spec Data* from being changed after the *Spec Execution* is created
8. Optional: Remove the *Initiate Request* user action if there is a Spec Execution generated to keep the ratio of requests and *Spec Execution* records 1:1