My Stuff
Going to SuiteWorld? Connect with SuiteGurus—Your NetSuite Product Experts!
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.
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.
Comments
-
Looks like you have some conflicting scripts, you'd have to dig into Invisalign_ss_salesforce.js and Invisalign_sch_process_approved_invoices.js to see what they are doing.
-
I believe the documentation is wrong... partly because in the example there are too many arguments in rec.setCurrentLineItemValue https://system.netsuite.com/help/helpcenter/en_US/Output/Help/SuiteFlex/SuiteScript/SSRecordsFieldsSublists_AddingandRemovingLineItems.html#N4053424961-0 //Get the new record var rec =…
-
I do something similar for fulfillments: a script runs a search for available lot numbers, and if there is only 1 available, it is populated in the fulfillment form. Can you distinguish the oldest lot number from the lot number itself, or is it by the expiration date?
-
No Problem! I ran into this a few years ago and ended up hacking my client script by adding nlapiSelectLineItem inside a loop... I really should go back and fix it now the way Lorne describes, cause that client script is so slow...
-
You hadn't selected the new line as the current line. salesOrder.selectLineItem('item', i+1); is required before salesOrder.setCurrentLineItemValue...
-
baseprice is only available as a field in 'Search Column', so you are probably stuck using an aftersubmit with a search. https://system.netsuite.com/help/helpcenter/en_US/RecordsBrowser/2013_1/Records/item.html
-
Maybe onemeat you could elaborate on what you are trying to do... I was assuming that you are trying to replicate the action caused by clicking the 'Mark All' button. If that's the case, then the script that runs from that button can just be copied.
-
The 'Mark All' button on an Item Receipt shows <input type="button" style="" class="rndbuttoninpt bntBgT" value="Mark All" id="markall" name="markall" onclick="itemMarkAll(true);return false; return false;" onmousedown="this.setAttribute('_mousedown','T'); setButtonDown(true, true, this);"…
-
He's using the custom field because the standard field is not used when a SO is transformed into a Fulfillment.
-
yes please post code
-
Add lines like this inside the nested ifs alert('stProgram = ' + stProgram); alert('stItemId = ' + stItemId); That should provide the clue to what's happenening
-
An afterSubmit won't change the record, because the record was already submitted. You can either change it to beforeSubmit, or you must reload the record in your script, and then re-submit it. Probably the first choice is best for this script.
-
You also need one final return true at the end as well ... // stProgram != '2' || '11' || '9' return true; } return true; }
-
function validateLine_rec() { var stRecord = nlapiGetRecordType(); var stProgram = nlapiGetFieldValue('custbody64'); if (stRecord == 'salesorder') { if (stProgram == '2' || '11') { var stItemId = nlapiGetCurrentLineItemValue('item', 'item'); if (stItemId == '24'... alert('You can not use this item for Classbook Orders'); }…
-
I would check for unnecessary usages, a scheduled script should be able to handle hundreds of transactions. Back-of-the-napkin calculation: 15 Sales Orders x [ nlapiLoadRecord (10) + nlapiSubmitRecord (20) ] = 450 units. That leaves you 9,550 units for your searches and other functions.
-
Try adding some alerts to debug, alert the values of the variables. Also, make sure you set the item id variable type to string, it might be a number
-
I can't tell from you post, are you doing this with a scheduled search? Also, if you are using a scheduled search, are you can deploying it twice (on the hour, and on the half hour), and repeating every hour? This gives you 20,000 units per hour.
-
Looking at this a little closer, stItemId == '81' || '423' || ... isn't proper javascript it should be stItemId == '81' || stItemId == '423' || ... but really it should be written cleaner, into an array or with switch/case
-
The first line, which is probably in a loop, could be replaced by one search. My other thought about custom columns depends on your business logic, so maybe it works, maybe not. In a simplified case, each item line in your estimate would have a hidden field with a sourced value from the custitem_promotional record.
-
jschneller - a search is going to be much more efficient. Even better would be custom column fields on the estimate record that are sourced from the item record. Then you don't have to do any searches or lookups. Not sure if that works for your scenario though.
-
Ah thanks for explaining that. The documentation on that is pretty poor, nlapisubmitfield doesn't say anything about xedit, only that it works for inline-editable fields.
-
Whatever you need to get your results of customer records. If you don't need anything, then you should replace filters with null (I think this is valid) var results = nlapiSearchRecord('customer', 'customsearch_custtransdate', filters, columns);
-
You haven't set any filters for the search. Before your line var results = nlapiSearc... you need to define the filters array
-
Solved it, I had an error in my deployment
-
Glad to help! If you are doing that many time frames, you might be SOL. If your time frames are always by month, you could break this into two pieces that will help the formula length. 1. Create a custom formula field (don't store value) that uses the month formula from my last post. 2. Then your formula could be CASE WHEN…
-
One simple solution CASE WHEN {customrecord.internalid} = '1759' THEN CASE WHEN {customstartdate} BETWEEN '07/01/2012' and '08/01/2012' THEN 1 WHEN {customstartdate} BETWEEN '08/01/2012' and '09/01/2012' THEN 2 WHEN {customstartdate} BETWEEN '09/01/2012' and '10/01/2012' THEN 3 WHEN {customstartdate} BETWEEN '10/01/2012'…
-
What I mean is you could grab the YYYY and MM like this to_number(to_char({customstartdate},'yyyy')) to_number(to_char({customstartdate},'mm')) and then you use those in a formula (untested psuedo-code) 12 * ( to_number(to_char({customstartdate},'yyyy')) - 2012) + to_number(to_char({customstartdate},'mm')) - 6 This give…
-
According to the help file, itemvendor is only available for certain Assembly Items. So unless it's undocumented, you probably aren't going to be able to get to that sublist. Vendors The internal ID for this sublist is itemvendor. This sublist is an inline editor sublist. (In the NetSuite Help Center, see Inline Editor…
-
try debugging with this function fieldChanged(type, name, linenum) { if (name == 'custrecord_bsb_top_up') { var bsb_top_up_status = nlapiGetFieldValue('custrecord_bsb_top_up'); if (bsb_top_up_status == 'T') { alert('Checked'); nlapiDisableField('custrecord_bsb_po_transaction', true); } if (bsb_top_up_status == 'F') {…
-
ahhh ok. Can you recreate it as a saved search? If not, you might be able to allow the report as a web query, and then do some automation through another like excel with macros.