My Stuff

User_LD2YZ Red Ribbon

Comments

  • Exactly Robbie it mentions all dependant records by type. Unfortunately it does not give further detail such as the record id. I envision having to still doing some fairly hefty dynamic searches since I'm going to guess NS will not provide the record id's even if it stores the record types but it's better than having…
  • I believe you need "Yield" the script so that it's put back in the queue. Once a slot is available the script will then continue from the point you yielded and the governance is reset. I recommend you do not leave your check to 35 in the code above just in case your code expands and / or you end up routing slightly…
  • Not sure if this would help but what happens if instead of using the $.getJSON you used nlapiRequestURL and specified in the header that the type is "application/json"?
  • Seems the only thing stopping this working was that I needed to URI encode the URI for the redirect_uri parameter. Nothing else needed encoding, the whole URI I was building did not encoding, just that one parameter value. Amazed nobody felt willing or able to help me with this but hopefully I've helped someone else…
  • Your error message is "That record does not exist." did you confirm that the dynamically generated URL does indeed contain correct record id information and isn't blank (potentially due to some issue with scope)?
  • which is???? (when I see these posts I'm looking for the same answer and not knowing what you did is like taking out the best part of the story :( ) Hi Aaron, apologies, I only just saw your comment about the solution. The initial idea was to send the user an email with a link that would log them in. This changed to…
  • Interesting scripts and articles thanks for taking time to post this!
  • Thanks for replying AmyExo, I've subsequently chosen a different approach.
  • Can I suggest something? Put all your values in JSON like this : var myjson = {"24":"", "25":""}; then you can quickly and cleanly dispense with that awful "If" statement like this : if(myjson.hasOwnProperty(stItemId)){ do something in here} so your code will be : function validateLine_rec() { var stRecord =…
  • I would try var myresponse = response.getBody(); and check what myresponse looks like just in case you're not getting back what you are expecting? You may want to look at this thread, where someone points out the need to convert '&lt' to '<'…
  • Without looking too long at the code which is quite hard on the eye without nesting, and since you don't seem to want to identify to the user a specific line that is in error I'd suggest : 1. Set a Boolean to false before the loop. 2. if your error condition is met set it to true 3. on leaving the loop check the Boolean…
  • You still need to re-assess the use of isAllNotChecked ;)
  • I realise my thread has been hijacked by polaki.swathi (create your own thread next time cheeky! :p (only joking)) but wanted to say thank you to Brett for replying because what you've posted could be useful to me! (I think I need to revisit some of my other work and review some of the "work arounds" I've done when not…
  • Ok presuming this is a client script, can you spark up the NS debugger and stop the process just after you get the response and in the immediate console window look at response.getBody(); to see exactly what it looks like. I appreciate you *are* already doing this in the log but I'm curious to see if you are actually…
  • I wasn't suggesting you try and get the value from the file. ;) I was suggesting you just go right ahead and use the responseXML1.getElementsByTagName('Envelope') instead of trying to convert it to an xml object.
  • If you have a look at BrettKnights response at the top and the link he provided I think that should answer that particular question for you ;)
  • From the link Brett supplied previously it looks like there are 2 ways to code this: I see you already tried : var theID= nlapiSelectNode(xmls, '//a:IdToReturn'); Did you try the other way? var theID = nlapiSelectNode(xmls, '//*[name()=\'a:IdToReturn\']'); (no idea if this expects the "a:") Apologies if I'm barking up the…
  • OK so if it "appears" to be XML already, have you tried working with the response.body without trying to convert it to an XML doc? I'm scratching my head, I admit, might seem crazy but maybe it already thinks it is an xmldoc and you can reference xmls directly? The only other thing I have found in the past is that the…
  • Looking above, if I read correctly you seem to have "V002222true" as your response which doesn't look like something I'd expect to be converted to an XML document? I could be wrong but pretty sure you need xml tags in there and then that string can be converted to an XML document. Unfortunately it has been a while since I…
  • Hey Brett, Thanks for the reply it never occurred to me to do that and useful to know!
  • The only other thing I can think of right now is that you may not have set your header up correctly when returning your response? You may have to specifically set it up as such header['Content-Type'] = 'text/xml; charset=utf-8';
  • Thanks for replying Brett. Only just had a read through of your response today as I've been on vacation, I have managed to use nlapiSelectValue to retrieve a node value as prescribed :) I've skimmed the forum thread you linked and will try and digest that when I get a minute. Happy New Year to you and thanks again for your…
  • I'm guessing you got this sorted since it's 4 months ago but incase anyone else is scratching their heads I found using the debugger the following response : TypeError: Cannot find function getBody in object However if you do var myBody = httpResponse.body; You'll get what you wanted. Seems nlapiRequestURL function return…
  • I know Guillaume touched on this, if you are willing to get dirty you can add a button using a user event script "BeforeLoad". I've used code like this below to add a button and retain the netsuite style, again, it's NOT elegant but does work... so far. function userEventBeforeLoad(type, form, request) { if…
  • I do something similar but not quite the same which may give you ideas if not supply the answer you're looking for. (It may also seem hammer to break a nut). I perform a search for item receipts that match the item I'm interested in and in column filters include the nlobjSearchColumn('inventorynumber', 'itemnumber', null);…
  • You may find the field you are interested has a different internal name depending on the record you're referencing at the time. Not sure if this will help massively but take a look at this: https://system.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2014_1/script/record/account.html You say "the same scenario…
  • Sorry this isn't answering your question but could I ask, why wouldn't you be doing everything in NetSuite? If you only have a handful of records in Salesforce why not export them to CSV and import them to NetSuite and off you go with NetSuite? Now would be a great time before you start putting transactions in to SF.
  • If I understand correctly you are wanting to lookup a field - "3rd param" on a record based on it's type - "item" and id of "DIGITAL_VERSION_ID". In scripting terms that's possible using nlapiLookupField such as this example from the help getting the "email" field value from an "employee" record using "salesrep" as the id:…
  • Have you inspected the fields to see what their style properties are? Maybe you can run a JQuery script once the page is loaded to set whatever IE is expecting or a background colour that might show in IE as you want? I'm no IE advocate, in fact I never use it but that's small compensation or help when you may not be able…
  • You posted this under "Web Site / E-Commerce" which lead me to believe it wasn't a standard NetSuite form! However it's potentially possible to add an inline HTML field and jack in some code to do what you want but I'd be wary as it's very "hacky".