My Stuff
Comments
-
Olivier is right that you should use a template. Here's some code I use to do the same thing you are attempting -- I wrote it without a template but you could add that in. // look for late invoice and send an email with pdf attached function find_late_invoice(type) { // Variables var send_from = 9; // Internal ID of NS…
-
Madhur is right, this needs to be user event, but not only on Item Fulfillment, also on the Sales Order itself (and any other transaction that might affect a SO). If you can tolerate a slight delay, a scheduled script would work and might be easier to manage.
-
Three ideas: 1. Will any of the operators will work in your script? I'm guessing you already looked into this... after anyof before between contains doesnotcontain doesnotstartwith equalto greaterthan greaterthanorequalto haskeywords is isempty isnot isnotempty lessthan lessthanorequalto noneof notafter notbefore…
-
The key to this is that 'client scripts' only run when a record is opened in a browser. So a client script would work for user when opening a SO, and displaying info for that user. But there are lots of ways to get SO created/modified/closed without opening them in a browser.
-
Try all lowercase, 'expectedreceiptdate'
-
Hi Jordan, have you tried lowercase cc? Alternatively, you could instead do this as an aftersubmit, and then use [INDENT]nlapiSendEmail(author, recipient, subject, body, cc, bcc, records, attachments, notifySenderOnBounce, internalOnly, replyTo)[/INDENT] and then merge the email with the transaction. [INDENT] [/INDENT]
-
Try this instead. I don't think you can use the object name in getValue() str = str + m[i-1].getText('account',null,'group') + "," + m[i-1].getValue('<strong>formulacurrency</strong>',null,'sum') + String.fromCharCode(13);
-
Did you ever find a solution to this?
-
It doesn't look like it there are problems. I would make use of the debugging function and see which steps are slow. Snippet of code: function timestamp(x){ var d = new Date(); var n = d.toTimeString(); nlapiLogExecution('DEBUG', x, n); }
-
I know there is an account setting to allow scripts to run during Csv import. There might be one for mass updates too, check your NS settings in admin role.
-
Try the sublist 'sitecategory'. If that doesn't work, possibly the main body fields primarycategory, storecategory, storecategory2. https://system.netsuite.com/help/hel...ntoryitem.html
-
You can do this without scripting or workflow. On your custom field, set type to 'free form text', uncheck 'store value', make it a formula {customer.lastmodifieddate}, and apply to 'Contacts'.
-
You are dealing with a sublist so it would be something like this (this code is not tested) function MessageAtCheckout() { //get the message from custom field in transaction form var msg = nlapiGetFieldValue('custbodycheckout_message'); //searching webstore category for items with categories 201872 and 202450 var…
-
Ah ok. Yes you are right that the contact record isn't really updated, it just gets a value displayed on the UI or in search results. If your 3rd party integration is real-time (or close to it) then User Event Script is really the right way to do this, but it could potentially add a lot of time to a customer record save.…
-
In addition to Teddy's script, you should consider [LIST] [*]This script will be limited to 1000 contact records [*]For each contact record per customer, the user load time will increase [*]You also need a script on the contact record to handle creating new contacts [/LIST] Also there's an error in there, it should be var…
-
I'm not sure about a Report, but you can do something like this with saved searches. To expand on tr_carl.billings post, you can email reports to variable recipients, using one or more Dynamic Groups. Unless your criteria lies outside of NetSuite, you should be able to get that to work.
-
The fields are indeed 'createpo' and 'createdpo' but they are not available as a search filter. Scroll down on the record browser page and you will see that they don't show up under 'Search Filters' or 'Search Columns' You can access those fields by loading the record, but that's a lot of work for your script. One solution…
-
I would re-order your script, putting all the 'inventory' functions together. And I don't see any reference to 'inventoryassignment' in the NS record browser, are you sure that's a valid sublist on this record type? <span style="color:'#000000'"><span style="font-family:'arial'">var pasteItems =…
-
What's the error?
-
Transaction text names are documented in this Help page. I wish it was in the record browser, but at least it's documented. Also, there are Transaction Statuses that can be found here, this is still undocumented in Help.
-
If you paste the subfunction at the end of your script, it will be defined. You can always paste your full script here, would make debugging it much easier.
-
The 'customform' field is what you need. In your script, throw in a line like this: var what_form = nlapiGetFieldValue('customform'); Which will return the internalid of the form. Then run logic based on the value. This is a very useful page for finding fields exposed to suitescript:…
-
I've found it useful to use a subfunction like this: function netsuite_text(field_name){ var result = nlapiGetFieldText(field_name); if (!result) result = nlapiGetFieldValue(field_name); return result; } then in your main function, instead of trying to figure out if you'll get the internalid or the text for a particular…
-
You've got a script that was written with unsupported methods. I don't know what "Synccountry" refers to, but the error is from trying to determine your subsidiary. Try replacing (window.location.pathname.indexOf('subsidiary') != -1 && typeof(Synccountry) != 'undefined') with (nlapiGetFieldValue('subsidiary') != -1 &&…
-
Campaign Response is not supported for scripts. But you can access it through web services, the supported record is CampaignResponse : https://system.netsuite.com/help/helpcenter/en_US/Output/Help/SuiteCloudCustomizationScriptingWebServices/SuiteTalkWebServices/WebServicesSupportedRecords.html
-
Are you using 2014.2?
-
I would do it like this: var days_to_add = 90; var expected_as_string = po_record.getLineItemValue('item', 'expectedreceiptdate', '1'); // get NS value as a string var expected_as_date = nlapiStringToDate(expected_as_string); // convert string to Date in js var adjusted_as_date = nlapiAddDays(expected_as_date,…
-
This has been a problem for a long time. You might be try changing the file extension xlsx. I get around it by sending CSV files.
-
Olivier is right, most/all barcode scanners are defaulted to append the barcode with an ASCII 13 character, which submits a web form. Check the user manual of your scanner, there's usually a way to switch the append character to 'Tab' or 'None'
-
Pagination should only occur with a 'Client' script. If you write a 'User Event' or 'Scheduled' script you won't have that limit (although there are other limits).