Custom Forms
What are Custom Forms?#
Custom forms control the layout and appearance of data entry screens and printed documents in NetSuite. They determine which fields appear, how they're organized, and which elements are visible to different users.
Types of Custom Forms#
Entry Forms#
Control the interface users see when creating or editing records:
- Transaction forms (Sales Order, Invoice, etc.)
- Entity forms (Customer, Vendor, Employee)
- Custom record entry forms
Transaction Forms#
Specialized for business transactions, supporting:
- PDF layout design
- Email templates
- Advanced printing features
Preference Forms#
Customize the appearance of specific record types based on preferences.
Why Customize Forms?#
Simplify User Experience#
- Hide irrelevant fields
- Show only what users need
- Reduce clutter and confusion
Enforce Business Rules#
- Make fields mandatory or read-only
- Control field visibility by role
- Guide users through processes
Match Business Processes#
- Organize fields logically for your workflow
- Add custom fields in appropriate locations
- Create role-specific views
Professional Documents#
- Design invoices matching your brand
- Customize printed forms for customers
- Create professional-looking PDFs
Creating a Custom Entry Form#
Step-by-Step Process#
Navigate to Forms
- Customization > Forms > Entry Forms or Transaction Forms
- Click New
Select Base Form
- Choose the standard form to customize
- Name your custom form clearly
Configure Screen Layout
- Add or remove fields
- Organize into field groups
- Create custom tabs and subtabs
- Set field properties
Set Field Properties
- Display type (Normal, Inline, Hidden)
- Default values
- Mandatory requirements
- Display order
Configure Roles
- Assign form to specific roles
- Set as preferred or restricted form
Example: Custom Sales Order Form#
Scenario: Create a simplified sales order form for sales reps
Configuration:
Form Name: Sales Rep - Sales OrderBase Form: Standard Sales Order Form
Main Tab: Primary Information: - Customer (Mandatory) - Date - Sales Rep - Terms Items Subtab: - Item - Description - Quantity - Rate - Amount Custom Tab - Shipping: - Ship Date - Shipping Method - Shipping Address - Tracking Number (Custom Field) Hidden Fields: - Promo Code - Partner - Lead Source Assigned Roles: - Sales Representative - Sales ManagerField Groups and Organization#
Creating Field Groups#
Group related fields together with visual separators:
Contact Information Group:
- Phone
- Mobile
- Fax
Address Information Group:
- Address Line 1
- Address Line 2
- City
- State
- Zip Code
Best Practices for Organization#
Logical Flow Arrange fields in the order users typically complete them:
- Key identifiers first (Customer, Date)
- Classification fields (Type, Status)
- Detail fields
- Financial information
- Notes and attachments
Visual Hierarchy
- Most important fields at the top
- Group related fields together
- Use clear group labels
- Maintain consistent spacing
Field Display Types#
Normal#
Standard field display with label and input
Inline Text#
Shows field value as read-only text, good for calculated fields
Inline Editor#
Allows quick editing directly in line
Hidden#
Field exists on record but isn't visible on form (useful for defaults and scripts)
Display Only#
Shows value but prevents editing
Tabs and Subtabs#
Creating Custom Tabs#
Organize forms with multiple tabs for complex records:
Customer Form Example:
- Main tab: Basic customer information
- Financial tab: Credit limit, payment terms, pricing
- Relationships tab: Contacts, partners
- Marketing tab: Campaign responses, preferences
- Custom tab: Industry-specific fields
Subtabs for Child Records#
Display related child records as subtabs:
- Contacts subtab on Customer
- Items subtab on Sales Order
- Transaction History subtab
Role-Based Forms#
Assigning Forms to Roles#
Different roles can see different forms for the same record type:
Example: Customer Forms by Role
Sales Rep:
- Basic contact information
- Communication history
- Sales opportunities
- Hides financial details
Credit Manager:
- Full financial information
- Credit limit and terms
- Payment history
- Hides marketing data
Administrator:
- All fields visible
- System fields shown
- Advanced options available
Setting Preferred Forms#
Mark a form as preferred for a role - it becomes the default for that role.
Restricting Forms#
Prevent specific roles from using certain forms.
Custom Transaction Forms (Advanced)#
PDF Layout Design#
Design how transactions appear when printed or emailed:
Elements to Customize:
- Company logo and branding
- Field positions and labels
- Headers and footers
- Line item layouts
- Totals section
- Custom messages
Template Structure#
Header Section:
- Company information
- Logo
- Transaction type and number
- Date
Body Section:
- Bill To / Ship To addresses
- Transaction details
- Line items table
Footer Section:
- Totals
- Notes
- Terms and conditions
- Payment instructions
Advanced PDF Features#
Conditional Display: Show elements based on conditions:
Show "Thank You" only if Amount > $1,000Display rush shipping message if Ship Date < 2 daysCustom Footers: Add personalized messages, legal disclaimers, or payment instructions.
Multi-Language Support: Display different languages based on customer preference.
Form Scripting#
Enhance forms with client scripts:
Common Script Uses#
Field Validation:
// Validate phone formatfunction validatePhone(type) { var phone = nlapiGetFieldValue('phone'); if (phone && !phone.match(/^\d{3}-\d{3}-\d{4}$/)) { alert('Phone must be in format: XXX-XXX-XXXX'); return false; } return true;}Field Dependencies:
// Show field based on selectionfunction fieldChanged(type, name) { if (name == 'custbody_order_type') { var orderType = nlapiGetFieldValue('custbody_order_type'); if (orderType == 'rush') { nlapiSetFieldDisplay('custbody_rush_reason', true); } }}Auto-Population:
// Auto-fill fields based on selectionfunction fieldChanged(type, name) { if (name == 'customer') { var customer = nlapiGetFieldValue('customer'); var terms = nlapiLookupField('customer', customer, 'terms'); nlapiSetFieldValue('terms', terms); }}Testing Custom Forms#
Test Checklist#
- All required fields function correctly
- Field validation works as expected
- Calculated fields compute properly
- Conditional visibility works
- Form renders correctly for all assigned roles
- PDF output appears as designed
- Email templates work correctly
- Form performs well with large data sets
- Scripts execute without errors
- Mobile responsiveness (if applicable)
User Acceptance Testing#
Involve actual users to:
- Verify field placement makes sense
- Confirm all needed data is accessible
- Check that form supports their workflow
- Identify any usability issues
Best Practices#
Design Principles#
Simplicity
- Only include necessary fields
- Remove unused standard fields
- Keep forms as simple as possible
Consistency
- Use similar layouts across related forms
- Maintain consistent field naming
- Apply uniform styling
User-Centric
- Design for most common use cases
- Put frequently used fields prominently
- Provide helpful field labels and help text
Performance Considerations#
- Limit the number of fields on a form
- Avoid too many sublists
- Be cautious with complex scripts
- Test with realistic data volumes
Documentation#
Document your forms:
- Purpose and use cases
- Target roles
- Custom fields included
- Any special logic or scripts
- Change history
Maintenance#
- Review forms quarterly with users
- Remove obsolete fields
- Update based on feedback
- Keep documentation current
- Archive unused forms
Troubleshooting Common Issues#
Form Not Appearing#
- Check role assignments
- Verify form is not restricted
- Ensure feature dependencies are enabled
Fields Not Saving#
- Verify field permissions
- Check for script errors
- Ensure field isn't read-only unintentionally
PDF Layout Issues#
- Test with different data scenarios
- Check for overlapping elements
- Verify conditional logic
Performance Problems#
- Reduce number of fields
- Optimize scripts
- Consider splitting into multiple forms