My Stuff
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Comments
-
Aye, I have done inventory detail for other records, but the bin transfer is apparently special and not fully documented. I was successful using a variation on the sample you provided, so kudos for knowing the magic field names. With some hacking around on a completed bin transfer record (using &xml=t) I was able to see…
-
thanks! I'll give that a try. However, nowhere could I find documentation on "binnumber" and "tobinnumber" - the records browser for bin transfer doesn't mention those fields at all?!
-
Are you suggesting this just for potential performance reasons or something else? Just as a bit of advice I would suggest getting the lineItemCount before the For Loop, and check the value before it enters. var lineItemCount = nlapiGetLineItemCount(....) if(lineItemCount >= 1) { for (var i = 1; i <= lineItemCount;…
-
I've approached this by having one suitelet serve up the HTML5 SPA and other suitelet(s) act as the backend API. Angularjs as the primary enabler.
-
Here is one technique for getting the total count of records from a search (I'm showing a saved search below but the concept is the same for an ad-hoc search): // run a modified search just to get the total record count var search = nlapiLoadSearch(null, searchId); var origColumns = search.getColumns(); // trickery to get…
-
I'd like a solution to this as well. Using count-of-internalid won't work with saved searches that can produce the same internalid value more than once in the output. I just threw together a default transaction search and it includes lots of duplicates on internalid - which means count of internalid is nowhere near the…
-
Yes, it's reusable library code that I'm talking about. I was hoping my library code could autodetect what sort of script it's executing in, rather than requiring the caller explicitly provide it.... e.g. fubar() rather than fubar(type).
-
Thanks for the tip Olivier. I did look into getExecutionContext() prior to posting. However, it looks like that function returns what triggered/invoked the current script. It doesn't appear to be explicitly telling you what sort of script it is that called getExecutionContext(). For example, according to the online help…
-
I think I've used 'haskeywords' in searching phone numbers e.g. you can pass a phone number without punctuation (e.g. 1234567890 and it will match phone records like 123-456-7890).
-
Not JSON because the external destination for this serialized stuff is an XML interface not under my control. :\ I think the object-to-XML builder could be fairly complicated; would love to see a BrettKnights crack at it (or partial implementation to avoid said tedium!). There are a few libraries I've found that do it in…
-
Having to set up a dedicated proxy service as a workaround seems overkill and makes solutions more complex and thus brittle. I suggest NetSuite just start supporting CORS. The RESTlet platform would be a perfect place for this. RESTlet configuration should let me specify the CORS header to control what domains I want to…
-
I agree with the theories presented here, but I just wish a netsuite employee that knows the inner workings of the system would comment.
-
minifying a javascript file doesn't have to change any variable or function names. There is much to be saved by simply removing any characters not required by the javascript interpreter without any changes to identifier names. Part of my motivation for considering it for server side script is indeed 'unification'.…
-
Actually no, that is not usually done ( in javascript ). If you changed the function names of a library then other code that calls it would break (assuming you didn't minified all the code together). Obfuscation isn't important in my use case. I appreciate the discourse, because now I think it best to have both the…
-
Thanks phanak. I must have replied before seeing your final messages.. Anyway, the takeaway is the full 'developer' version of JS libraries is best practice for use in NS.
-
thanks for the reply Willy, but that's not quite what my question was about. If you can point me to a records browser link that defines all possible values for the 'type' property per my original post, I'd be grateful!
-
Thanks amccausland, that's helpful! ironside, This is where I always go to find that list: https://system.sandbox.netsuite.com/app/help/helpcenter.nl?topic=CARD_-29 I'm not sure if it maps the same on your system, but the Help Center topic is nlobjForm.addField()
-
A bit off topic, but the best IDE for javascript is JetBrains WebStorm, hands down. It is so much better than anything else I've been tempted to write a NetSuite file upload/download plugin for it.
-
Puzzling behavior. Regarding syntax, I concur with Pries. The 'err if err instanceof...' isn't valid ECMAScript syntax, but rather a Mozilla extension. I gather it works in NetSuite by association (Rhino). I think an ECMAScript-compliant catch block argument may only contain an identifier; conditional catch blocks are not…
-
Here we are approaching 2 years later, and still IE renders the Netsuite UI in quirks mode (i.e. welcome back to the nineties). Specifically I use ECMA5 Object.create() which is available in the last several versions of IE but not when it's stuck in 1995 quirks mode due to the lack of a <!doctype> directive on the page.…
-
Ironically, I finally let go of uploading json2.js for server side suitescript because it's natively supported by NetSuite now. :)
-
Thanks for the tips! I am sticking to the published user event functions, but it's core javascript support that's lacking in IE5. Specifically, I'm talking about industry standard ECMAScript5 support, which is supported by IE9. ECMAScript5 is supported in server-side SuiteScript. The IE5/quirks limitation means I cannot…
-
Thanks for catching that typo!
-
I believe with RESTlets you can send along either query string parameters or a JSON object and the restlet will automatically convert it into parameters to the restlet entrypoint (model binding).
-
I'd love to post some stuff, but much of my suitescript has depedencies on other libraries (for the same motivating reasons as the original poster). Hence, while potentially useful, they're not usable in isolation.
-
Oh, the currently logged in user's email (and a bunch of other useful information about the current user) are available via the nlapiGetContext() method. I've never used @CURRENT@ so I'm not sure if nlapiGetContext().getEmail() solves your problem or not? Using this method allows you to have access to the logged in user's…
-
OK, let me mention one. Javascript supports objects at its core, but the netsuite API tends to favor method calls over object orientation. So, I build a simple library to make netsuite records act more like normal javascript objects. For example, instead of: var r = nlapiLoadRecord(type,id); var bar =…
-
Thanks for the quick reply Evan, and yay NetSuite for supporting ECMAScript 5 on the server! I'm coming from a long C++/C# background and every feature you list above is essentially native in C#/.NET. Therefore, they are all features I'll likely consider. I wanted to avoid trying to use a (ECMA5) feature (e.g. accessor…
-
no, I'm building support/utility pure javascript code that can be tested in isolation - i.e. it doesn't require any nlapi() access. ...I will however eventually desire to develop nlapi code and cleanly unit test it on my desktop. Do you have any suggestions for a javascript mocking framework that makes mocking nlapi()…
-
My interest (in this case) is in formal unit testing (not integration testing) of code, not debugging. Thanks for the tip on the debugger - I'll definitely take a look at that, but my IDE is where I want to do the majority of my work, moving to integration testing in netsuite only when ready.