The question is why this matters
Project-based businesses often invoice from a corporate address while the work happens at dispersed job sites. The question is why that mismatch matters: tax calculations, shipping rules, and audit trails all depend on the actual work or delivery location. So what does this mean for teams using NetSuite? Without a consistent way to propagate a project’s job site address to invoices, tax accuracy and operational clarity suffer.
This draft describes a hypothetical Job Site Address Script and associated customizations that automatically populate invoice shipping addresses from a project-specific job site record. Treat the design below as a systems-level blueprint — it is written as if the code exists, but remains intentionally hypothetical until you deploy and validate it in your environment.
How the Job Site Address Script works
The solution is organized into three script components and a small set of custom records/fields. At a high level the flow is:
- User selects a Project on an Invoice.
 - Client script reads the Project’s linked Job Site Address and displays a formatted preview on the invoice form.
 - On save, a user event script writes the job site values into the Invoice shipping address subrecord so NetSuite’s native tax engine calculates tax by location.
 
Script roles and responsibilities
- User Event Script (Before Submit) — Sets invoice shipping address from the Project’s Job Site Address. Runs on create and edit so saved invoices always reflect the selected project.
 - Client Script (Page Init, Field Change) — Looks up the Project’s Job Site Address when the Project field changes and formats a preview into a display-only body field on the invoice.
 - Workflow Action Script — Invoked by a Project workflow to maintain bidirectional links between Job Site Address, Customer, and Project when the Project Address field changes.
 
Required customizations (record and fields)
At the core is a custom record type called “Job Site Address” (script ID: customrecord_cfcx_jobsiteaddress). It holds structured address elements and links to Customer and Project. Projects gain a lookup to that custom record and Invoices gain a display-only preview field.
Key fields on Job Site Address
- Attention, Addressee, Address Line 1/2, City, Zip — free-form text
 - State, Country — list/record links for consistent reference data
 - Customer, Project — list/record links for relationship maintenance
 
Project and Invoice custom fields
- Project: 
custentity_cfcx_projectaddress— lookup to Job Site Address - Invoice: 
custbody_cfcx_job_site_addr— long text preview of formatted address 
Deployment and execution notes
Deploy the three scripts with clear execution contexts and conservative logging. Recommended deployments (hypothetical):
- User Event Script: Execute as Administrator, Status=Testing, Log Level=Debug (then move to Released/Error in production)
 - Client Script: Status=Testing, Page Init + Field Change handlers
 - Workflow Action Script: Triggered by Job Site Address changes on the Project workflow
 
Design decisions that matter
- Write at save, preview at selection — Client script provides immediate visibility without modifying persisted data; user event applies authoritative change before submit so tax engine sees the shipping address.
 - Lightweight updates — When the user event script runs, it updates only the shipping address subrecord fields to minimize write scope and reduce row locking.
 - Non-blocking notifications — Use toast messages to inform users if a Project lacks a linked Job Site Address rather than preventing saves.
 
Testing checklist and common scenarios
Before moving this hypothetical solution to production, validate the following:
- Create a Job Site Address with full address data and link it to a Project.
 - Create an Invoice, select the Project, and verify the preview field shows the correctly formatted address.
 - Save the Invoice and confirm the shipping address subrecord contains the job site values and taxes compute as expected.
 - Change the Project on an existing Invoice and verify the script replaces or clears the shipping address appropriately.
 - Test Projects with no Job Site Address to ensure the preview clears and a non-blocking notification appears.
 
Troubleshooting and operational guidance
If the address does not appear, first confirm the Project links to a Job Site Address and required fields are populated. For tax recalculation issues, verify NetSuite’s tax engine and tax code mappings for the country/state in question. Use the Script Execution Log to inspect runtime errors and confirm field script IDs match your instance.
Common pitfalls
- Mismatched field IDs between the script and account configuration — validate IDs in account before deployment.
 - Insufficient permissions — scripts running as Administrator mitigate this during testing; ensure service roles have appropriate access in production.
 - Formatting edge cases — strip leading punctuation and empty lines when building the preview to avoid ugly results in the long text display.
 
Implementation patterns and variants
This design is intentionally minimal: preview on the client, authoritative write on save, and a workflow action to keep relationships consistent. Variants include:
- Auto-assigning a Project-level default shipping address for recurring billing scenarios.
 - Adding address validation (third-party or regex rules) before saving the Job Site Address record.
 - Exposing the address mapping in a report/dashboard for operations and tax teams.
 
Ultimately, what this means in practice
Ultimately, a Job Site Address Script like this removes a common source of tax and shipping error in project-centric invoicing. It gives invoice writers immediate visibility of the work location while ensuring NetSuite’s tax engine receives an authoritative shipping address at save time. The result is cleaner audit trails, fewer tax surprises, and lower operational friction.
The takeaway is simple: treat the Job Site Address as first-class data tied to Project and Customer records, show it to users early, and write it authoritative at submit. Implement this pattern as a hypothesis, test in a sandbox, and iterate based on the edge cases your business surface.

