My Stuff
On Friday, October 10, 2025, at 8:00 PM Pacific Time, our Case Management System will undergo a scheduled maintenance for approximately 4 hours. During this time, case creation via SuiteAnswers will be unavailable and inbound calls will be routed to Customer Service.
Share Your SuiteWorld Experience & Earn a Special Badge!
Comments
-
Hi Jamie, Happy to hear your script works. Here are a few extra things your script could benefit from: * Use nlapiLookupField() rather than loading the record. nlapiLookupField is more performant that loading the entire record. * Start your function with if(type!='delete'). You're going to get a blocking errors otherwise…
-
Wait, are you running this script on the customer record or on the invoice?
-
There is no built-in solution like a "search next". There's usually 2 broad approaches you can take: either you recall the search with an additionnal filter filtering out the first 1000 - such as filtering on internalid greaterthan the internal id of the thousandth item of your first result batch - or you can process the…
-
Don't load your customer till after your if()s otherwise you're going to kill your metering, plus slow the GUI down for nothing. Otherwise, check the dev guide again. It's called "Post Sourcing" - p.87 for example.
-
Are other users using a custom form of some sort, perhaps with some fields hidden?
-
Ah, you create standalone invoices rather than tranforming SOs. The solution is to move your script to postSource(list, name) and check if(name=='entity') if(nlapiGetFieldValue('entity')!='' && nlapiGetFieldValue('entity')!=null)
-
Blank out the "Unhandled Errors" tab on your script
-
Do you have team selling on? If you do I'm not sure you can use 'salesrep', I think you have to open up the team and find the primary rep. Otherwise you can try running your script in the debugger to see if the problem is that you are not getting a value of if it is the setting that isn't working.
-
I believe there's also a hidden line marker. isitemgroup or something..? I dunno, check out the &xml=T of a SO with a group, you should see something in the line item fields.
-
I don't think it's possible to "seperate" the members of a group (like, you can't insert another independant item bang in the middle of group item members), so you should be able to build logic where you can identify the start of a group, consider the following items are members of that group, and then identify the closing…
-
Credit Card numbers are normally encrypted (even to scripting). You can get the LAST 4 digits I think. I don't think there's any way to get the rest.
-
function beforeSubmit(type){ if(type!='delete') { nlapiSetFieldValue(PROJECT_PRICE, nlapiGetFieldValue(CUSTOM_FIELD)); } } replace PROJECT_PRICE and CUSTOM_FIELD with the appropriate field ids.
-
Hmm... Yes, I think this can be scripted. I don't have it coded right now, but it seems doable.
-
I think the Online Form does not have the require rights to access Saved Searches in Netsuite. Try fully coding your search within your script rather than calling search 2271 with additional filters. Just code all your filters and columns straight in the script.
-
I did not say User event script wouldn't work. It's simpler to setup than a Suitelet, so I would actually use Online Form + User Event. As I understand it, the only thing standing in your way are your radio buttons. You can replace radio buttons with checkboxes, just add some scripting to manage mutual exclusion. Upon…
-
Ahh... that's a bit too much for me to casually debug. At this point I can only tell you your approach is sound. Must be a little problem somewhere.
-
Sometimes this forum injects spaces for no reason, so does your code really say 'inventory item'? If so, that should be 'inventoryitem'.
-
If using an Online Form, the radio buttons really need to be Netsuite fields that exist in your custom record. If you create them using only html they are not going to get saved anywhere. I believe 2009.2 supports radio buttons, so you should be able to do it using that version. You can pass whatever you like to a…
-
use nlapiCreateRecord() and then record.setFieldValue() to populate it. Just check the API for nlapiCreateRecord, the rest is pretty traightforward - just there are a lot of fields to populate, so that may give you some trouble. Don't forget to submit your record at the end.
-
You're coding your Suitelet in a very non-standard way. Looking at it I guess it looks alright, but really you should probably be creating the Suitelet content by using the nlobjForm object, and attaching client-side scripts with form.setScript().
-
Once you've loaded the item, you need to use it's methods rather than nlapi... - i.e., record.setFieldValue(). When you're done, you then need to call nlapiSubmitRecord(record).
-
Yes. Place a UE script on the record being created by the online form (i.e. on a Customer or Custom Record, depending on what kind of online form exactly you want). When the record is created, your script fires and creates the SO. Does that answer your question?
-
Well, running something like "if (nlapiGetLineItemValue('item', 'quantity', i))" doesn't generally work very well, because that will return true if nlpiGet.. returns anything at all, and Netsuite usually returns '' or null when there is no value, which technically speaking is something and thus will always be true. It's…
-
Ah I get that sometimes... can't quite remember what it is... I think it has something to do with not passing a correct value into a date field, or not using one of the nlapiStringToDate / nlapiDateToString functions right? Something like that.
-
Is this a client or UE script? I'd output the values of everything being used, to make sure all the values are what you expect. 'upc' may well be null or somehting.
-
For Quantity, you can use the Inventory Activity Detail Report. If you need it to be a Search (which you do for code), or in general you want to know historical lot numbers, you must run a complete Transaction search till your nearest Inventory Adjustment Worksheet and piece the sequence of in and out back together. No,…
-
Right, your basically talking about an AJAX-style refresh, which is not (easily) possible with Suitelets - unless you want to code the AJAX behaviour yourself. However, your idea of reloading the form with parameters should work fairly well. You are passing the EmployeeID as parameter - but is your code doing something…
-
Yes you can, but not from the Request object, which does not exist in Client side. Instead, you'll be able pull GET params using basic javascript methods.
-
You can only set values in fields that are Do Not Store Value, or fields created dynamically. You may want to transfer your logic to the Client Side init() trigger.
-
The client side Init() has the parameter type. i.e. function init(type) { if(type=='create') { } else if(type=='edit) { } } Otherwise, you can also call nlapiGetRecordId(). If it returns null or blank, it's a create.