My Stuff

User_KC8S1 Red Ribbon

Comments

  • I'm surprised to hear about these problems you guys are running into. I have extended Array's prototype quite a bit and it hasn't given me any trouble. I've run into trouble extending ns objects but not the standard language objects. Here is a sample, although I'm sure it's the same stuff you are all doing: if…
  • Is the first form redirecting to the second using client script (e.g window.location)? If so, just dump your data in the URL and pull it out on form #2. e.g. http://blahblahblah.com/pathToMySecondForm.nl?leadname=Steve&leademail=steve@place.com Actually, you can do this server side also, doesn't need to be client side only.
  • It will take too long to supply you a working example and isn't really my style. Here are the relevant pieces that should get you up and running. This is a method from a view utility class that will create a button. this.addInnerButton = function ViewUtil_addInnerButton(id, text, clickHandler, tab) { id = id || 'cstbtn_' +…
  • https://usergroup.netsuite.com/users/showthread.php?t=9468&highlight=getSetting https://usergroup.netsuite.com/users/showthread.php?t=13877&highlight=getSetting While searching for answers to your question (for which there are many, many posts) I came across this one where Yang clearly shows the usage. Maybe you missed it?…
  • I'm sure you have already thought of this, but just in case you haven't: You can use permissions to prevent deletion. Like I said, I imagine you want to do a case-by-case deletion-block, but just in case you don't... permissions may be a good way to go.
  • Need more info. How are you opening the second form? By form, are you referring to SuiteLets? Do you have SuiteLet A post, then redirect to SuiteLet B? Please give an overview of what you are doing and how.
  • Ravi, You can't create a button on a tab using the standard api. The bits and pieces that I posted are my solution to add a button to a tab (or anywhere really). Basically you need to create the HTML that will render the button and add an HTML field to the nlobjForm.
  • I've done this a lot. The solution is to use an HTML field and then set the class to the NetSuite button class you want it to look like (yellow button or gray button). I'm away from my computer and will post some code when I get back. It's actually a very simple solution.
  • try nlapiGetContext().getUser()
  • There is no way for us to help you with the limited information you have supplied. If it's a client script you can debug with Firebug. In the case of a UE script you can use the NetSuite debugger. Looking at the code you supplied there is nothing wrong, so the problem is elsewhere.
  • My mistake, this is an edit/view mode (feature?) that is consistent with the rest of the application
  • for a custom list's items you just need to click on the name of the list and you will see the table of name/id pairs. Very similar to Mat' suggestion; Setup > Customization > Lists
  • Good morning, When we do an inventory adjustment, there are a few default selections I would like on the form that fill in automatically, one being the adjustment account. Ours in this case when picked from the list is "11300 INVENTORY", however the following doesn't work. nlapiSetFieldValue('account','11300 INVENTORY');…
  • Can you tell me how you would include additional libaries in a suitescript script? It's not easy. NetSuite is sorely lacking in this regard. You can only define one "library" file (and it even serves it up in the incorrect order, like putting #include statements at the bottom of your .cpp file) If you define functionality…
  • Hi Steve, Actually I meant in Scripts, how do I get the text for the list item? Ah, ok, well I'm still not sure if you want to get a list item text from a field on a record or if you want to lookup the data from the db. More detail would be helpful. I will cover all scenarios:[LIST] [*]client code, need text from…
  • Sounds like you should be using a sublist of type list if you want it to work like the sublist you see on the Print Transactions/Forms/Statements pages. Thanks, Yang Is there a trick to add lines to a 'list' sublist with the client code? I'm getting a reference error when I try to do anything with a 'list' sublist. I need…
  • Here is a visual reference for the list types (why isn't this in the the documentation?!) http://pmddirect.com/temp/sublist%20examples.pdf As you can see there is no visual difference between 'list' and 'staticlist'
  • filter on 'xedit' - search the help for details.
  • Ok, i just realised i've been in a mentaly challanged state :) !! Welcome!! ;) So i assume the best practice in a netsuite enviroment would be to add common functions to the library script and then call them as required. Exactly. Namespace (as much as that's possible with javascript) your stuff. NetSuite doesn't have it's…
  • Thanks for the info. BTW, someone from documentation should copy and paste that into the help. Reading the help, I'm unclear what the difference between these two lists are: inlineeditor - An edit sublist with inline fields (similar to the Item sublist) list - A list sublist with editable fields (similar to the Billable…
  • Beer is good. ;) Glad it worked for you, have a good weekend.
  • Hi, 'type' means 'record type' e.g. 'customer', 'task', 'salesorder', etc... So you want this: nlapiSubmitField('customer', 31, 'custentity_account_health', health) I'm assuming that 31 is the internalId for a customer? If not, then this is also a problem. Basically nlapiSubmitField translate to: "Set the field('field') to…
  • Thanks for the info. I'm running my search from the client, I can't build the list on the server. Sounds like I will need to use the inlineeditor. :(
  • problem is all the lines NEED to be added on the client. I'm calling the web service from the client. I just reviewed some of my previous posts and see that I failed to mention that. I've got to ask... why the limitation on adding lines? Why not allow this?
  • Yang, here is what I really need to do, maybe you can save me some time and tell me if it's possible. I have a SuiteLet that is calling a web service. I need to display a list of data returned from the service call and allow the user to select one of the results. I have implemented this as an inlineeditor with 4 columns,…
  • You are just missing some concepts. You must supply a customer id. it's not optional. You can get the customer id from the call record (assuming your reps initiated the call from the customer record OR specified a customer on the call record) Run this code and tell me if it works, it should: function afterSubmit(type) { //…
  • So you want a customer field to display a value that is stored on a phone call record? Like "last time called" or something like that? Assuming yes, this is easy and you almost had it. When you "get" the value from the phone call record you need to store it in a variable so that you can turn around and assign it to the…
  • Date object arithmetic results in milliseconds. So if you want to find days, minutes, etc. it's just a matter of division. for example: var secondMs = 1000; var minuteMs = secondMs * 60; var hourMs = minunteMs * 60; var dayMs = hourMs * 24; var diffMs = date1 - date2; var minutesBetween = Math.round(diffMs / minuteMs); var…
  • Sorry, I intended to include the details message but forgot. The error is: "ReferenceError: custpage_mylist_machine is not defined" Here is the code I'm trying to use: // Constants var listId = 'custpage_mylist'; var columnAId = 'custpage_column_a'; var columnBId = 'custpage_column_b'; var columnCId = 'custpage_column_c';…
  • Good point. I just noticed that this field isn't even documented. Technically that means that we only support the direct creation of email messages (the default message type). Fax messages are automatically created if you call nlapiSendFax(...) and attach to another record. Thanks, Yang Right, but please do consider adding…