My Stuff
Comments
-
Couple of things to try (from a quick glance at your code) change filters[0] = new nlobjSearchFilter("entityid","customer","anyof",customer); to filters[0] = new nlobjSearchFilter("entity","customer","anyof",customer); or filters[0] = new nlobjSearchFilter("entity","customer","is",customer); If that doesn't help comment…
-
Prefixing yes, good idea and I am already doing that. My concern was whether or no NetSuite is extending Object (and after a bit of snooping around it appears you are) so I will avoid a lib. that takes that approach and go with a separate "Base" object solution. Thanks, Steve
-
In the deployments tab of my client suitescript, there appears to be no way to apply it to my custom form (That is to say the form does not appear in the "applies to" list.) Is there some other way to apply the client script to my suitelet? Yeah, I was a bit unclear/wrong in my post, sorry. You need to define a client…
-
Is there any way to control the behavior of a submit button of a suitelet form? I'd like to be able to perform form validation before the data is actually submitted, and possibly execute other scripts. Maybe a non-submit button would serve this purpose better? <snip> Thanks Deploy a client form script against your…
-
I had to quote it so it wouldn't change the case. LIST_SEARCHRESULTS
-
Hi Yang, That's what I'm doing now, and it works. This would just be a nice function. Sorta like how nlapiLookupField is just calling nlapiSearchRecord, but it's nice to not have to setup the filters, columns, etc. -Steve
-
Yeah, what Olivier said. :)
-
Ditto, I could still use it too :confused:
-
can you try calling nlapiGetCurrentLineItemIndex(type) in your fieldChanged event as a workaround? Yeah, that's what I'm doing. Enhancement 137242
-
Be careful though. There is a very important difference between e.getCode != null and e.getCode() != null. I would use the former if you just want to mimic an instanceof nlobjError test otherwise you will get an error. Thanks, Yang Thanks, I caught that already and had changed it, should have updated the thread. :)
-
OK, figured it out. This proved to be one of the problems that resulted in a much greater understanding of javascript - always a good thing. In order for the stacktrace to show the method name the method NEEDS A NAME! Duh! :p So this will work: x.prototype.someMethod = function x_someMethod(){} the "x_" is so we can tell…
-
we are adding support for email templates. Hi Yang, Only email templates? No PDF or Letter? (to name a few) Can you please name some more? even a glimpse at what is coming can change my plans today. Please.
-
Which aspect of #1 do you consider a bug? The unexpected error or the requirement for a valid record reference? I will enter the cases when you confirm.
-
Good suggestion. if(e.getCode() != null /*instanceof nlobjError*/) Works like a charm. This will greatly speedup finding my bugs, thanks.
-
The defect for the instanceof issue is Defect 136987
-
Just purchased a book called "Pro Javascript Design Patterns" and am reading the chapter on interfaces.. Came across this: It is a technique to determine whether an object is an instance of a class based solely on what methods it implements, but it also works great for checking whether a class implements an interface. This…
-
It's an nlobjError that is being thrown, here are some details: code: TypeError: node has no properties Details: undefined StackTrace: stacktrace: function nlobjError(code, error) arguments: {TypeError: node has no properties,'undefined'} function nlapiCreateError(code, detail) arguments: {TypeError: node has no…
-
Note that the names are field names with the NLDropDown index appended. This means that if you add a custom field that is a drop down or hide some fields, etc, etc this name you wrote down would be invalid. A better way would be to create a quick search function to look for anything STARTING with the field name- to hell…
-
but can I edit the contents of a list shared between forms based on the role of the user? Unless something has changed very recently there isn't a built in way to filter the list. I wish there was as this is something I need to do often. You can access the NLDropDown objects from the window's dropdowns property. // Get the…
-
Hi Yang, So far I have only seen it happen on this one record. Defect# 136814 is tracking the issue. I've looked at the record that doesn't work and compared with records that do work and can't see anything that is suspicious.
-
What kind of script? If it's a UE you can check the "Run as Admin" on the deployment.
-
Hi Dave, I had trouble getting a suitelet popup window (window.open) to manipulate the main window recently. The solution a colleague came up with was to add the "dependent=yes" statement to the window.open command.…
-
Perhaps a new function altogether: nlapiLoadRecords( typeArray, idArray ) that returns an array of nlobjRecords in the order specified. Now the question is how would error handling work. Yeah, new function would of course work and in this case, might be worth it as there doesn't seem to be a clear, intuitive way to…
-
I hadn't really thought it through to that extent, interesting question. I could imagine it working three ways (maybe more?): recordType {string} // 'customer' recordId {string} // '1' recordType {string} // 'customer' recordIds {array} // ['1', '2', '3'] recordType {array} // ['customer', 'case'] recordIds {array} //…
-
That's a good idea (beforeLoad events firing during mail merge). Yang, would this be difficult? It doesn't seem like it would, I suppose if the merge framework was loading records outside the application domain then you wouldn't have the script hooks in place, but I don't see why they *would* be loaded any different than…
-
well that and created date is readonly. It was just for example purposes, swap your desired date field as needed;)
-
If you comment out setting duedate what happens? From a quick glance I suspect it's not going to like the date value you are giving it. Not sure, but maybe something like: var dDate = nlapiGetFieldValue('startdate'); var d = nlapiStringToDate(dDate); d.setDate(d.getDate() + 30); // other stuff…
-
Funny, I just dealt with that same thing at 3:00 AM this morning! :p I'm not sure, but it *feels* like something changed with what date formats we can send to a dateField on a record. I'm not sure though, nothings makes sense at 3am. Try converting your value to a string representation that NetSuite expects: mm/dd/yyyy OR…
-
Thank Olivier! That worked. Seems a bit odd that we need to set that field, but it worked and that's all I care about right now! :)
-
I wondered about that and was thinking of something similar, thank god I can't thread with javascript or I'd already have some ugly solution on my hands! :) The performance gain would be fantastic but a whole new set of challenges would emerge. For example, I have a script that pulls pricing for certain line items from the…