Proposal Summary
Hay Australia needs an automated system to generate QA/Batch Numbers based on various parameters. This proposal outlines the development of a solution to automate the generation of QA/Batch Numbers for Paddock Seasons. The customization will create custom records that contain the necessary parameters for batch number generation.
Requirement
Hay Australia demands that QA/Batch Numbers be generated automatically depending on some specific factors. The specifications necessary for batch number generation will be contained in a Paddock Season custom record that will be created. To identify an item’s lot number during inventory transactions, users will use the created batch number and manually enter it into the inventory detail field.
Deliverables
We propose the development of an automated QA/Batch Number generation system that will streamline the process and ensure accuracy. A script will be generated to combine these specified parameters, separated by a dash, resulting to a batch number. The generated batch number will be provided in the QA/Batch Number field in the Paddock Season record.
The system will follow these key steps:
1. Parameters Gathering
The QA/Batch Number field will be populated by the script based on the following parameters:
• Entity ID: Obtain from the Entity ID field associated with the selected “Grower” in the related contract.
• State Code: Retrieve from the State Code of the location connected to the chosen Related Contract.
• Hay Season: Extract the last two digits of the Hay Season from the Related Contract.
• Paddock Number: Fetch from the selected “Paddock Name” field.
2. Parameter Validation
Before generating the QA/Batch Number, the system will validate whether all the required fields for QA/Batch Number generation are available:
• If any of the four parameters are missing, the script will not generate the QA/Batch Number.
• If all required fields are available, the script proceeds with QA/Batch Number generation.
3. QA/Batch Number Generation
The QA/Batch Number will be generated automatically upon selecting the last required parameter (before saving the record) based on the gathered parameters.
The customization will be working based on changes in the two fields:
• Related contract
• Paddock Name
For example, the generated QA/Batch Number will follow a format like <Entity ID>-< State Code >-<Last two digit in Hay Season >-< Paddock Number>“.
For example, “40-1-22-3″ as depicted in the attached screenshot.

4. QA/Batch Number Uniqueness
The system will ensure that the generated QA/Batch Number is unique. If a duplicate number is generated, the user will be notified and restrict the save of the custom record, and they must modify one of the parameters to resolve the issue.
5. User Notifications
If any of the parameters are missing or incomplete, the script will display a notification with the following message to the user indicating that the information required for QA/Batch Number generation is incomplete. “Kindly confirm if all the parameters required to generate the QA/Batch Numbers are available. Kindly resubmit records.” Users will then have the option to manually enter the QA/Batch Number.
6. Real-time Updates
Any changes made in any of the parameters will reflect in the autogenerated number.
Bulk or Server-side creation of Paddock Season Custom Record
Upload CSV File:
• Users initiate the bulk import process by uploading a CSV file containing Paddock Season data.
• The system verifies that the CSV file contains the required columns (e.g., Entity ID, State Code, Hay Season, Paddock Number).
Data Validation:
• The script validates each row of data in the CSV file against predefined business rules and data integrity checks. Common checks include: o Check if Entity ID exists in the system. o Validate the State Code against a predefined list. o Verify the format of Hay Season. o Ensuring that Paddock Numbers are available.
• When the QA/Batch Number is already available in the file, then the script will override its value only when the “Manual QA/Batch Number” is unchecked.
Record Creation:
• Valid rows of data are used to create Paddock Season custom records in the NetSuite.
Error Handling:
• For rows with validation errors, the script captures and logs the errors.
• Errors can include details about the specific issue, such as “Entity ID not found” or “Duplicate QA/Batch Number”.
• The system also marks the row as failed in the import process.
Assumptions
• It is assumed that the necessary data, including Grower information, location data, related contracts, and Paddock Names, are readily available and accessible for automation of batch number in the custom record.
• QA/Batch Number population will be done on the field change of Related Contract and Paddock Name.
• The automatically generated QA/Batch Number will be unique. If a duplicate number is generated, the user will be unable to save the custom record and must modify one of the parameters.
• A Paddock Season record will be created for a single Item.
• If any of the four parameters are missing, the script will not generate the QA/Batch Number. In this case, a notification will be displayed indicating that the information required for QA/Batch Number generation is incomplete, and the user needs to manually enter the QA/Batch Number.
• Script will work while creating and updating the custom record “Paddock Season” where the checkbox “Manual QA/Batch Number” will considered while creating the record only. This customization will not consider the field dependency (status of the checkbox “Manual QA/Batch Number”) while updating the record
• The generated QA/Batch Number will be immediately available upon selecting the last required parameter (before saving the record) to allow the users to review and update as required.
• Users can manually override the auto-generated batch number when the “MANUAL QA/BATCH NUMBER” checkbox is enabled.
• “Run Server SuiteScript And Trigger Workflows” checkbox will be checked while importing the CSV file.
Risks
• Script will not populate the “QA/Batch Number” when the “MANUAL QA/BATCH NUMBER” is checked.
• For backend processes, user need to pass a static value in the QA/Batch number field as it is a mandatory field in the custom record