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
-
Yeah, you have several errors in there. Lemme give you a hand here - I'll correct and explain the mistakes - 1. function caseSupportHold() { 2. 3. 4. 5. // Get the current record 6. 7. 8. // Get the customer for this case 9. var customer = nlapiGetFieldValue('company'); 10. 11. //search filter on the customer record 12.…
-
You can only pop an alert in Client-side scripts, which by definition only run in Edit mode.
-
Yeah, a search can only return 1000 records - but you only need 1 result returned, i.e. the highest, most recently created, item number. With some grouping or a sort (thus requiring you to refer to a GUI search rather than building it from scratch in js), this should work out fine.
-
Sort of.. You can send an email using scripting via the nlapiSendEmail() funtion, but it won't be the actual "Send Subscription Email" email. Hopefully will be able to get you pretty close to what you want to do.
-
Do you have to do this client side? I hate working with line items client-side for this very reason. Could you do this in beforeSubmit instead?
-
Yeah, you could do it with suitescript. on beforeSubmit of create I would fire off a nlapiSearchRecord to find the item most recently created and increment the number by 1. I would also place a client-side script to disallow any manual modification to the Item Name/Number field so as to not screw up the logic. If you do…
-
Damon raises a good point. If you're ALWAYS going to transfrom into an item receipt, skipping straight to the CM might just work. However, to try to answer your problem, I think you need to iterate through each item line on the receipt and tick in the "received" box. Hold on, I have a piece of code doing this somewhere -…
-
nlapiSearchRecord() is actually a cheaper call that nlapiLoadRecord() so I don't recommend doing that if you can avoid it (though loading the record and reading from it would of course work). Not the end of the world, but hey, always good to keep that stuff in mind. In the case of your search, the problem is a very tricky…
-
Try putting your number as strings (i.e. case '1':). Might do the trick, I remember having trouble like this before too.
-
Have you tried reproducing the exact same search in the GUI?
-
So if he did an afterSubmit script, and did var thisRecord = nlapiLoadRecord(nlapiGetRecordType(), nlapiGetRecordId()); var name = thisRecord.getFieldValue('entityid'); name = 'A'+name; thisRecord.setFieldValue('entityid',name); (as opposed to name = nlapiGetFieldValue('entityid') it would work, because by explicitely…
-
There certainly is. I am assuming you have never done any Suitescript before. Scripting in Netsuite is different than scripting a typical HTML website. I highly recommend you take the time to go through the Suitescript Developper Guide, found under Help->User Guides. There are many things you need to be aware of, from…
-
Hmm, that ****s that the number is generated after afterSubmit. That throws a wrench in things indeed. You could call nlapiScheduleScript(), but there's issues with that, since it'll be asynchronous.
-
Nah, it's real easy to do and it makes sense. Something along the lines of var STORE_A = ?; var STORE_B = ?; beforeSubmit(type){ if(type=='create') { var currentName = nlapiGetFieldValue('name'); var store = ???; if(store==STORE_A) { nlapiSetFieldValue('name','A'+currentName) } else if(store==STORE_B) {…
-
As detailed in the User Guide, the "Testing" deployment only executes for the Owner of the script. Thus, when you order from the web store, you are not logged in as the owner of the script, it will not trigger.
-
Well the prompt will return the string value, right. So after you just need to run an nlapiSearchRecord and filter based on the string you received. No results = record does not exist.
-
I think I may have originally missed that this needed to work from the web store front end - that complicates things. The fabled and very vaporous Scritable Checkout would be your best bet, should you ever get your hands on that. Otherwise it can probably be achieved, but with DOM hacking and much sweat and toil.
-
Well if you want to make it super hot make a Suitelet offering all the possible choices. Otherwise, pop a prompt() box to ask for the number that the user will have to type in.
-
Scripts on a programatically saved record are ONLY triggered when Scheduled or Suitelet script saved them. User Event scripted saves never trigger other UE scripts. So you have several options. 1) Merge your .js and run all the code from the first UE. But that doesn't work for you in this case. 2) Call nlapiScheduleScript…
-
Your credentials don't matter. A script in Testing has an Owner that is am Employee (or Vendor) record. You place orders using a Customer. It'll never work. The only thing you can do to test the script is to deploy it only to your customer, and debug the ol' fashion way using nlapiLogExecution. That is to say, you'll never…
-
This thread may enlighten you. In short, you can't call any nlapi functions. BUT, it's not very hard to accomplish what you're looking to do, since I'm doing the exact same thing. You have to stick your code in a inline HTML field (as described in the above thread), and that code is simply a windows.open() calling your…
-
This can be achieved through scripting. The OP is on the right track. It's just that you can't add/remove options from a standard dropdown. You'll need to create your own dropdown in a beforeLoad script. Then you can play with the options in your "fake" field. Upon saving, copy the value selected in the fake field to the…
-
If 'invoice' does not work, try 'CustInv' or 'custinv'
-
In client side, you can stick window.ischanged = false; That'll stop the screen from thinking the record changed and will stop asking you.
-
Nope. Not without some clever engineering. Here's a couple ideas that may help - 1) Use a filter you can control easily. If you have 3000 rows, try using a filter that slices your results in manageable chunks, like maybe date or something. Then you can run the search several times and collate your results 2) If you using…
-
Even if you rename something, its programmatic name does not change. So "City Pair" is still 'class'. Your code is not working for a reason other than this concern. Did you try logging value3 to see if the internal id in that variable is what you expect it to be?
-
In javascript Arrays kind of act like hash sets since your index can be a string value (myArray['valueA'] = 10). Don't know if that helps you.
-
Out of curiosity, why do you need to do this?
-
Yeah, can you basically replicate a Mass Update type functionality. Basically, you would end up calling nlapiScheduleScript() to do some lenghty processing, and since now you can call nlapiSecheduleScript() from within a schedule script, you can daisy chain executions to make sure your script runs till you're done. Of…
-
1. You need to define a Column for every field you want to return. i.e. - columns[0] = new nlobjSearchColumn( 'internalid' ); columns[1] = new nlobjSearchColumn( 'custrecord36' ); ... 2. You can then access the column with a call to getValue(). i.e. - var searchresult = searchresults[ i ]; var custRecordValue =…