Discussions
Read on for the latest updates including:
• Agenda Builder launch
• SuiteWorld On Air registration
• New NetSuite Prompt Studio Contest
• And more!
Check out this thread to learn more!
Don’t miss your chance to meet our SuiteGurus—NetSuite Support professionals and subject matter experts with extensive experience in select product areas, including OneWorld, Advanced & Basic Accounting, Supply Chain Management, Receivables & Payables, CRM, Account Administration, and the SuiteCloud Platform. Full Conference attendees can prebook exclusive 30-minute one-on-one sessions for your product questions.
Spots are limited! Register through your Agenda Builder and find SuiteGuru under Agenda Enhancements.
Creating Quote from Project Record Script
I'm trying to create a quote via a script from a project record. The project record contains all the information I need to create the quote, but for some reason when I use a client side script to create the quote - I get the following error message:
An unexpected error occurred in a script running on this page.
createChangeOrderButton (button)
customscript_g5_cs_project
INVALID_CUSTOMER_RCRD
This customer record -1 is not valid. Please create the customer first.
I've created a client side button with the following code:
function createChangeOrderButton(){ var projectId = nlapiGetRecordId(); var customer = nlapiGetFieldValue('parent'); //create quote var recQuote = nlapiCreateRecord('estimate'); var recQuoteId = recQuote.getId(); nlapiSetFieldValue('custbody_reseller',3415); nlapiSetFieldValue('custbody_distributor',3414); nlapiSetFieldValue('custbody_end_user',13814); nlapiSetFieldText('custbody_order_type','Contract - New'); nlapiSetFieldValue('custbody_bill_to_tier',1); nlapiSetFieldValue('custbody_ship_to_tier',1); nlapiSetFieldText('probability','60%'); nlapiSetFieldValue('entity',3415); recQuote.selectNewLineItem('item'); recQuote.setCurrentLineItemValue('item', 'item', 24); recQuote.setCurrentLineItemValue('item', 'project', projectId); recQuote.commitLineItem('item'); var reqQuoteId = nlapiSubmitRecord(recQuote, false, true); var quoteURL = nlapiResolveURL('RECORD', 'estimate', recQuoteId, true); window.open(quoteURL, '_blank'); }