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
-
Can you run the below code with a few Alerts and tell us what the results are? function fieldChangedAddSubject(name) { alert(name) if (name == 'custevent_call_type') var callType = nlapiGetFieldText('custevent_call_type'); alert(callType) if(callType == 'A') { alert('setting W') nlapiSetFieldValue('title', 'W'); } else if…
-
Hmm, perhaps you could try nlapiPrintRecord(). You could load a record, change the form, save it and print it. Trick is then displaying the PDF right away... maybe a suitelet? Just some thoughts, might not work.
-
record.setFieldValue('customform',XXX) where XXX is the internal id of your form.
-
Yeah, this is a weird behaviour I've come across. Like I said, your feeding the item name to a filter looking for ID. But rather than the search not finding anything, it ignores your filter because it makes no sense to the search, and thus returns everything. Try switching to internal id.
-
Hi Ning You can use the debugger or sometimes just nlapiLogExecution() to keep an eye on the execution flow. The most likely problem is your search - it's probably not returning anything. Try doing this - var item_name = oneitem.getFieldValue('internalid'); Searches (and mostly everything else) is internal id based. Your…
-
Ah I just saw the problem, should have noticed earlier - fieldChangedAddSubject(type, name) You messed up your function entry params. Switch to the above line and it should work.
-
Ooops, yes, add return true at the end function onValidateLine(type){ if(type=='item'){ if(nlapiGetCurrentLineItemIndex('item')==1){ var lineDept = nlapiGetLineItemValue('item','department',1); nlapiSetFieldValue('department',lineDept); } } return true; }
-
Here is a quick and dirty script - function onValidateLine(type){ if(type=='item'){ if(nlapiGetCurrentLineItemIndex('item')==1){ var lineDept = nlapiGetLineItemValue('item','department',1); nlapiSetFieldValue('department',lineDept); } } } I think that should work. Let me know if you have problems.
-
No, you can do that. Check the help and look for "Website Tags". This explains how to retrieve certain record values to use in javascript to run particular logic.
-
You cannot use Netsuite APIs on web pages. You can use regular javascript however. The exception being possibly the upcoming changes in 2010.1 promising the ability to deploy scripting at checkout time.
-
Hi, I know what you mean. It can't be done right now. Note that, on transactions, Price Levels that don't have values for them don't appear as selections.
-
I doubt this will run properly. It's written as a beforeSubmit script, which if you are running in batch cannot work. You need to switch to a design suitable for a Scheduled script - 1. call nlapiSearchRecord to fetch all SOs you would colse 2. open each record with nlapiLoadRecord() 3. iterate through lines that have not…
-
Open the Help and type "Single sign-on". Netsuite has a Single Sign-On guide which is probably what you are looking for.
-
Last I played around with setting Lot Numbers, all you needed to do was feed it a string as such 'lotnumber(qty), lotnumber(qty), etc" - basically each lost number with qty in parentheses, seperated by a comma. Your array is incidentally working because array elements are seperated by commas when rendered as strings.
-
You can access Company Information using var config = nlapiLoadConfiguration('companyinformation'); config.getFieldValue([fieldnames]) Refer to the Help documentation for nlapiLoadConfiguration() for full details.
-
Is your script set to Deployed and the "All Roles" checkbox ticked in?
-
There is no monthly limit. It's strictly per execution. You can find out by calculating it manually (the documentation indicates units consummed by the various API calls), or you can stick a call to the execution context and check out how many units are left.
-
Uncheck all permissions except All Roles (and run as Admin) and try again. That might be a cause for problem.
-
You're talking about cross-window programming. That's a whole can of complexity. I would recommend, unless you have a lot of spare time to experiment, to simply throw the standard alert "hey, you forgot to enter shipping".
-
the beforeLoad trigger has 3 parameters - beforeLoad(type, form, request) You can place a if(type=='view') to restrict your code if that's what you want, or let it run for everything. Can could also verify the form you are running on if you don't want to code to run on all forms.
-
If you want the value to show on view mode. you'll have to use a beforeLoad user event script, writing into a Do Not Store Value field.
-
beforeLoad should work, you can continue your approach.
-
You can definately do it via scripting.
-
Do you have any scripting knowledge? I can give you pointers if you like - beforeSubmit(type){ if(type=='approve') { nlapiSetFieldValue(date, today) sendEmail() } else if (type=='edit') { --> requires more verification on edit to detect if this is an approval, mostly comparing the oldrecord with the newrecord if that's ok…
-
Well you can't submit a suitelet, because it's not a record. It doesn't exist in the backend as anything. Typically what you do is add a button that re-calls the Suitelet, but with an additional parameter (like submit=T). In your Suitelet creation code, you then add a verification to see if submit=='T' and if so, you run a…
-
Hmm, lots of things wrong I think. 1. var parentId = nlapiGetRecordId(); 2. var customer = nlapiLoadRecord('customer', parentId); 3. var subCustomer = nlapiGetNewRecord(); 4. subCustomer.setFieldValue('altphone',customer.getFieldValue('altphone')); 1. is getting the ID of the current record, which is the subcustomer you…
-
On the Deployment, did you tick in "All Role"?
-
Is it running at all, or plainly not running on web order? That's probably not your problem, but fyi you should call nlapiGetRecordId() to get the internal id, instead of loading getNewRecord to fetch the id. getNewRecord has a metering cost, getRecordId does not. Also, best practice would be to run this on beforeSubmit,…
-
A single given deployment is executed. A sceduled script may use 10 000 units per execution. You could say this thus means you get 10 000 units per deployment.
-
Cool! Cheers :)