Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Please note that on Saturday, April 11, 2026, at 8:00 PM Pacific time, our Case Management System will undergo a scheduled maintenance for approximately 30 minutes. During this time, case creation via SuiteAnswers will be unavailable and inbound calls will be routed to Customer Service.
set shipping and billing addresses
I've create a script that I'm deploying as a suitelet on our website.
It basically creads a prospect, uploads files, creates and opportunity and creates a task.
I am however struggling with the addresses. I have two address field blocks on the form and I want one address to be assigned as the billing address and one as the shipping(site) address. The code i have thought seems to set one address as both, any pointers?
record.selectNewLineItem('addressbook'); record.setCurrentLineItemValue('addressbook','zip',request.getParameter('zip')); record.setCurrentLineItemValue('addressbook','attention', request.getParameter('fname') + ' ' +request.getParameter('lname')); //record.setCurrentLineItemValue('addressbook','attention', 'Ship To: ' + request.getParameter('fname') + ' ' +request.getParameter('lname')); record.setCurrentLineItemValue('addressbook','phone',request.getParameter('phone')); record.setCurrentLineItemValue('addressbook','defaultbilling', 'T' ); record.setCurrentLineItemValue('addressbook','addr1',request.getParameter('yaddress1')); record.setCurrentLineItemValue('addressbook','addr2',request.getParameter('yaddress2')); record.setCurrentLineItemValue('addressbook','city',request.getParameter('ytown')); record.setCurrentLineItemValue('addressbook','displaystate',request.getParameter('ycounty')); record.setCurrentLineItemValue('addressbook','zip',request.getParameter('yzip')); record.setCurrentLineItemValue('addressbook','defaultshipping', 'T' ); record.setCurrentLineItemValue('addressbook','addr1',request.getParameter('siteaddress1')); record.setCurrentLineItemValue('addressbook','addr2',request.getParameter('siteaddress2')); record.setCurrentLineItemValue('addressbook','city',request.getParameter('sitetown')); record.setCurrentLineItemValue('addressbook','displaystate',request.getParameter('sitecounty')); record.setCurrentLineItemValue('addressbook','zip',request.getParameter('sitezip')); record.setCurrentLineItemValue('addressbook','addressee',request.getParameter('company')); record.setCurrentLineItemValue('addressbook','salutation',request.getParameter('salutation')); record.setCurrentLineItemValue('addressbook','email',request.getParameter('email')); record.commitLineItem('addressbook'); 0