My Stuff
Comments
-
nlapiCreateFile is not supported for client side scripting, which is my guess at what you are doing. Switch your code to something else.
-
I would have the client script call a Suitelet or Restlet to create the file on its behalf.
-
Oh I see. You were talking about mass updates, but I see you don't mean actual Mass Updates.
-
Yes, use a Scheduled Script, a Suitelet or a RESTlets and do nlapiLoadRecord/nlapiSubmitRecord. This will trigger scripts on the target record with the 'edit' entry type.
-
You might want to consider getting multi-queue so you can run multiple concurrent CSV imports. Aside from that, Scheduled Script or Suitelets are usually what is used to trigger other scripts on record submit. Keep in mind that a nlapiSubmitField action counts some (most) of the time as a XEDIT action rather than an EDIT…
-
Hey Wiz, try switching your starting declarations to var desc = '';
-
I recommend you read the Help under SuiteCloud (Customization, Scripting, and Web Services)-> SuiteScript-> Running a Script in NetSuite-> Step 3: Attach Script to Form
-
I'm not sure if I'm missing a point of complexity, but from my understanding, this sounds like a pretty classic case of "merging" two arrays while ignoring duplicates. Lots of ways to do that, but the key is that you pre-process your results into structures you control BEFORE outputting anything to HTML. Like, I would just…
-
Yes, that happens. Release Previews are on substantially inferior hardware. So, you'll get a lot more time outs. In the specific case of a stuck scheduled script, that can happen on any type of instance. You need to call NS Support and they will reset the queue for you.
-
Yeah I can confirm your findings as well. FYI if anyone here is interested - and not to take away from posting on this board - but I started a SS2.0 LinkedIn group so anyone dabbling can come post and discuss their difficulties and findings. Link: https://www.linkedin.com/groups/7010431
-
Can't spot the exact issue, but I can generally confirm the approach is sound, as I have done similar things in the past. I would work up a classic debug approach, trying to inject a simple alert(hello world) and moving up from there to see what's getting stuck.
-
This should work, but you'll need it to run client-side. Part of the problem is that you won't be able to use NetSuite client-side scripting infrastructure, since that does not have hooks for page unload. You will need to inject your code in the page, for example by using Inline HTML fields.
-
Yes I omitted pseudo code to store the columns, but that was the intent. As ironside does point out, libraries can also accelerate this type of development. Stops you from spending time re-inventing algorithms that have already been solved.
-
I'd put a script on the SO creation that detects if this customer used to be a lead or not. Failing that, a corrective scheduled script could do the job, though there would be a delay.
-
Yeah, you have several problems here. 1. This isn't related to your question, but unless you really hate your users, you should change your algorithm. Right now you're calling 2 searches PER LINE. That is insane. Switch your algorithm to call a SINGLE search, then iterate through results and assign the right value to the…
-
Hi Rafid, "Should I first loop through all lines and get all item codes and put them into an array, then include that array as one of the search filters ?" Yes. I wouldn't worry about the double "if". If you called 2 searches instead, each specifically focusing on a single location, your execution time would be higher…
-
In theory the UE script, unless you're doing something especially weird, will carry the session ID and you should be ok. Simply call the URL and it should simply work.
-
What event is this? If it's After Submit, nlapiSetFieldValue won't do anything; you would need to do record.setFieldValue or nlapiSubmitField
-
You cannot pass values to the button. Your best bet would be to write values in hidden fields and have the button read from those. EDIT: Don't know what I was thinking yesterday, Reread this and it's wrong - you can pass params, since you call a custom function. You're in charge of whatever you want to give it
-
getValue('custrecord_pm_record_name','name');
-
Funny, usually people have the opposite problem. I can't see anything wrong here, but it would take you 5 minutes to convert this to a non-expression filter, so I recommend you just do that and be done with it. e.g. : var filters = []; filters.push(new nlobjSearchFilter('type',null,'is','SalesOrd')); ...
-
In after submit, you must load the record, then submit it, whereas in before submit, you would not need to do either of those things. The after submit method will therefore cost you like 1 to 3 seconds more than you would need. After a while of scripting like that, you get noticeably long hang on saving every record. Not…
-
What is the reason you are doing this in After Submit and not Before Submit?
-
It's theoretically possible, since NS doesn't purge Sandboxes they take away until a considerable amount of time later. Does it still execute scripts though? Don't know, I've never noticed. I would submit this as a question to Support. They might not know either, but it's worth a shot, might get lucky.
-
I would strongly recommend just changing the script execution order to resolve the issue. Moving your code to After Submit here will have performance impacts. If you still wish to do this as AfterSubmit, nlapiSubmitField() would work fine, though you won't get any performance gain from it - assuming Location is at the body…
-
What are you stringifying?
-
This is not possible, no. You could write suitescript to do it, but you would need to physically remove the line items from the PO and add them back in the sorted order. So long as your PO has no ties to anything else, this should be possible. But if you are working with a Drop Ship or Special Order PO, or the PO has been…
-
You could hack the DOM to remove it, but I EXTREMELY HIGHLY do not recommend you do this.
-
How is Sales Rep capture on cost transactions? Is it just the COGS from the Item Fulfillment? I'm not sure about a Report, but I'd try pulling a Saved Search. Filter Account Type to include income and COGS and then group by sales rep and sum the Amount. You can add and group by the other columns mentioned. This likely…
-
You could customize the call record and add a Transaction multi-select field. It isn't the same as the native functionality, but it's pretty close.