Creating a summary box in a custom record in NetSuite involves several steps, including creating the custom record, defining fields, and adding the summary box with appropriate scripting. Here’s a step-by-step guide:
Step 1: Create a Custom Record
- Navigate to Custom Record Types:
- Go to
Customization > Lists, Records, & Fields > Record Types > New.
- Define the Custom Record:
- Enter a name for your custom record.
- Set the ID, description, and other settings as needed.
- Click
Save.
Step 2: Define Fields for the Custom Record
- Add Fields to the Custom Record:
- Go to the
Fieldssubtab on the custom record setup page. - lick
New Fieldto add fields to your custom record. - Define the field type, ID, label, and other properties.
- Click
Savefor each field.
Step 3: Add the Summary Box
- Create a Summary Field:
- Go to the
Fieldssubtab. - Create a new field that will act as the summary (e.g., a calculated field or a text field to hold summary information).
- Set Up Client Script for the Summary Box:
- Go to
Customization > Scripting > Scripts > New. - Select
Client Scriptand clickCreate. - Enter the name and ID for the script.
- In the
Script Filesubtab, upload your JavaScript file containing the client script logic
- Deploy the Script:
- Go to the
Deploymentssubtab of the script record. - Click
New Deployment. - Select the custom record type you created earlier.
- Set the status to
Released. - Click
Save.
Step 4: Test the Custom Record
- Create a New Custom Record Instance:
- Go to
Lists > Custom > [Your Custom Record] > New. - Fill in the fields and save the record.
- Verify the Summary Box:
- Check if the summary box displays the expected values based on your logic.
Step 5: Customize the Summary Box Display (Optional)
- Modify the Form Layout:
- Go to
Customization > Forms > Transaction Forms(orEntry Formsfor non-transaction records). - Edit the form used for your custom record.
- Drag and drop the summary field to the desired location on the form.