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
-
You are getting taxes and shipping in there. Run your search in the GUI with additionnal fields like item and memo and you'll see the junk you're picking up.
-
Not to my knowledge, no.
-
Uh, well, there is no problem calling a funciton within another function. However, in your case you're calling an improperly spelled function, and even if you were calling the right thing your second function has no return value. I don't know how you plan to convert your returned data into ab actual string though, so…
-
nlapiDisableField(fieldname, false); You're trying some stuff that is pretty off, so I suggest reading through the Suitescript Developper Guide before going any further.
-
What type of record are you talking about? Transaction or customer?
-
Hmm, I checked our files and I saw on Opportunities that when we might need to check when type=='view' that we do: if (type != 'create') { try { var thisRecord = nlapiLoadRecord(nlapiGetRecordType(), nlapiGetRecordId()); var thisForm = thisRecord.getFieldValue('customform'); On SOs I have if (type=='edit' ||…
-
Hello Michael, We have done scripts for this kind of thing before. We should be able to adapt something for you. Please feel free to contact me via my signature coordonates at your leisure.
-
Yeah I ran into this one. I discovered that nlapiGetNewRecord().getFieldValue('customform') works.
-
You need to deploy the script on Customer, Leads and Prospects. However, your line of code should be var theCustomer = nlapiLoadRecord('customer', nlapiGetRecordId()); because 'customer' is generic and will properly fetch customer, leads or prospects.
-
What is your User Event script code?
-
How are you getting the name in the first place? If you can get name, you can get internal id.
-
beforeSubmit or afterSubmit?
-
I think you're trying to submit your record as obtained by nlapiGetNewRecord(), correct? That is not allowed, nlapiGetNewRecord() is read-only. However, since you're in beforeSubmit, all you need to do is nlapiSetFieldValue(). You won't need to do any nlapiSubmitRecord after that, the record will save by itself when the…
-
Sorry, don't know how come I didn't see this post sooner. If you still need this, we in fact have coded something very similar recently (and anyway, it's not terribly hard), so could definitely help you out. Please drop me a line if still looking for help with this.
-
Or nlapiLoadRecord()/nlapiSubmitRecord()
-
I have a suspicion that 'approve' is like 'cancel' and other such "partial submission" types, meaning that they are exceptions to what you can normally do in beforeSubmit. Even though you're in beforeSubmit, nlapiSetField value won't work because you don't have access to the full record. Try nlapiSubmitField() instead.
-
It is possible. You can call nlapiLoadRecord as per normal.
-
Verrry interesting. Thanks Benjamin!
-
Benjamin, Have you tested this? Last I checked you could not make nlapi calls when sticking code into an inline HTML field. I'd be delighted if that has changed.
-
Mmm... maybe with a super-duper Evan Goldberg-level formula. Personally I would output to Excel and work with formulas from there.
-
the API allows for 3 parameters: result.getFieldValue(fieldName, join, summary) So in the third parameter, specify your summary (so either "group" or "sum" or whatever). Refer to the documentation for more details.
-
I'm not sure I fully understand the question, but the second parameter of nlapiRequestURL allows you to set POST arguments, therefore turning the call into a POST rather than a GET. Does that help?
-
There's no Client trigger for VIEW mode. His post is about popping an alert on view.
-
Right, Alert will only work in client-side script, and there is no client-side trigger on VIEW. But I just thought of something you can do: Create an inline HTML field Use a beforeLoad script to write into it <script>alert('hello world')</script> Now, in the beforeLoad script you'll want to maintain your logic as to what…
-
You can use "nlapiSetFieldValues" but refer to the documentation for restrictions.
-
Take you Netsuite date, add 14 days, and compare to today. If the date is still smaller than today, it's a least 2 weeks old. var today = new Date(); var nsDate = nlapiStringToDate(item.getFieldValue("custitem_online_date")); nsDate = nlapiAddDays(nsDate,14); if(today>nsDate) { //date is at least 2 weeks old }
-
Mmm, as well as checking the box, try setting a value in the Amount Applied (or whatever its called) field.
-
I've experienced the same thing for what it's worth
-
Right... I believe that when you do nlapiCommitLineItem, you cause your validateLine script to figure right back again. It looks like that if you set isindividualph or placeholder to False before the commit, you should avoid the loop.
-
The same risk exist if you use custom records. What if 2 records are created at the same time, thus running a lookup on the "next available" number at the same time and getting the same info? Exact same problem exists. There only 1 true way to make sure no risk of duplication and that's scheduling a script, as that forces…