My Stuff
Comments
-
I the first instance nlapiGetLineItemField requires 3 paramaters, the list('item'), the field ('class') and the line number... which you're missing ;) You can find out how many lines you have with nlapiGetLineItemCount('item'); and can then iterate through the lines. As an aside if you were actually looking to establish…
-
In the top of your RESTlet stick a line nlapiLogExecution('ERROR', 'Context =', context); have a look at the resulting Execution log output on the script and see if context is shown as [Object] or the text representation of it. If it's showing the text I suspect you need to wrap the context in a JSON.parse in the RESTlet…
-
When a button is added to a form you include the script and function to be fired. Depending on the timing on this I suspect it'd be possible to use that knowledge to create a UE that fires to trigger the function you need. I'm flying a bit blind here because I have never heard of EDI and although I appreciate you're trying…
-
Thanks for the reply Jonke, I felt sure I'd done exactly the same in the past but rather than waste time sifting through the many DEV accounts I work in finding an example I'll try the Suitelet option first chance I get. (I'll reply when I can confirm one way or the other :) )
-
Right, so... I've had to write a Suitelet that is called when you press the button and then the Suitelet queues the Scheduled Script. Shame I had to write an additional script to accomplish what I wanted and it's fiddly passing field / record / user values across script to script but hey, I got there eventually! Thanks…
-
Just to be clear are you saying that at the point the user saves it fails or on opening. It looks like on submit. If so I'd visit your script execution log and see if you have any clues in there. Failing that I'd start putting informative debug messages in to see at what point it's going wrong. (particularly if the only…
-
The only thing that stood out to me in the help section was "[LEFT]This API is currently used only in the context of the / Numbered Inventory feature. For information, see Using SuiteScript with / Numbered Inventory Management." Not sure if that helps or not, maybe it's a feature you're not using that's stopping you making…
-
Check the network traffic when you submit the form to see what data is included in the header / body, maybe the solution would be to jack in the detail you are wanting in to hidden fields and retrieve them after. A bit "hacky" I know but digging through a tonne of scripts I've written I cannot find an example of something…
-
Alternatively open up the debugger and use nlapiLoadRecord to grab a known custom record and look at the local variables tab to ascertain what you have available to you.
-
Pretty Sure Andrew has hit the nail on the head with this one. You'll need to keep track of the results to process all of them since you'll only get a set of 1000 at a time too. Keep in mind governance if you are looping through the results too as you can quickly rip through it on large search result sets…
-
This may not be exactly what you were hoping for but for future reference I was able override the customer default shipping address and use a user entered shipping address on a Sales Order. The script I wrote is a RESTlet and expects the entire SO from a 3rd party system as a JSON blob. I am using nlapiCreateRecord and…
-
Oh dear a folder is just like any other file essentially in NS, guess I missed that fact! A simple search is the way to go. Have to say I did think it strange you wouldn't be able to do this, seemed a bit "off". ;)
-
SuiteAnswers Answer Id: 27051 includes this example: function suitelet(request, response) { [COLOR=#7F0055][SIZE=2][COLOR=#7f0055] var[/COLOR][/COLOR][/SIZE] folder = nlapiCreateRecord([SIZE=2][COLOR=#2a00ff]'folder'[/COLOR][/SIZE]);…
-
Further to this if you are unsure of the date format being used you can use the following code: var context= nlapiGetContext(); var datefmt = context.getPreference('DATEFORMAT'); Using that as template you can substitute out the DD / MM etc parts with your values. NB NetSuite actually drops leading zeroes on the DD / MM so…
-
I would be inclined to look at the id you are trying to use, log that out, I suspect you are running the script as administrator and you're pulling back that id rather than the user,
-
Are you looking to report against this field or just want to see it when the assembly item is opened on screen? If you only want to see it on screen, you would be better off running a User Event Script set to run "Before Load" to populate a custom field on the form. The script you have created is pretty much what you need…
-
Not 100% familiar with this but wouldn't you: a) Get a list of companies from your contact in question. Loop through each company. b) For each company get the contacts list Loop through the contacts list looking for the person you are looking for. where there's a match update the role. I've not tried this BUT I have added…
-
(newer posted lower down, more detail)
-
Being curious I logged in to the debugger and ran a simple script that did this : var obj = nlapiCreateRecord('assemblybuild'); obj.setFieldValue("buildable","123.00"); var b_id = nlapiSubmitRecord(obj); it throws an error saying : Please enter value(s) for: Assembly, Quantity to Build, Location Which kinda confirms you're…
-
I have created CM's in script and not had a problem, what you have done matches what I have done except that you've actually set more fields than I did both on the CM and item line. (I mention this, as my first thought was you'd missed a mandatory field tripping it up!). I did the same thing, nlapiCreateRecord,…
-
If you are going with an inline field maybe you can check the page source to find out the total weight field name (presuming such a thing exists) and from there reference that in your script? There are a few sticking points with this method, not least of all the order that fields load on a page and the order in which…
-
May I add that installing Eclipse with NetSuite support would also be useful. You say you created and successfully imported a js file but that would have been just a few clicks with the Eclipse IDE. (yes, I know there are other IDE's out there...) Follow the tutorials as mentioned previous, if you already have software…
-
Thank you for taking time to reply. I have 2 items, one is to receive a 50% discount. So I updated the line item to be 50% it's original value and I created an "apply" sublist item that matched that value single line item value. This didn't help at all From what you're saying it sounds like I should be setting the applied…
-
Aha! Thank you very much Olivier for replying. I did read a post by an ERP Guru person (possibly yourself!) in response to refunds and noticed something in code supplied relating to "Apply". I'll take a closer look.
-
Hmm if I could bother you some more... The idea was that a percentage is applied against a specific item. (so only credit 50% for instance) So do I now leave the item line "as is" and just stick the 50% value into the applied sublist on the credit memo or is it that I continue to reduce the amount on the item line and…
-
Well, what do you know? :mad: ${record.shipaddress?replace("/n", "")} used to work but stopped... to fix it? This: ${record.shipaddress?replace("<br />", "")} So... how and when the heck did that change NetSuite? I appreciate the difference between the two replace criteria but why has the content type changed or have you…
-
In case anyone else has stumbled across this I have also found another method to resolve this.. that doesn't work! :h_a_w: <@compress single_line=true>Your line break littered text in here</@compress> as mentioned at http://freemarker.org/docs/dgui_misc_whitespace.html
-
So basically you have a body of text in a <p> that (potentially) spans multiple pages, which, in itself is fine but the field is Rich Text Format and the embedded formatting that comes with that is being displayed in the print. <gulp> Less than ideal, time consuming and very fiddly I know, but I wonder if a work around…
-
Hi Corey, I share your misery I've posted fairly extensive information about my dealings with Adv Print and even today I'm trying to resolve an issue with a Quote template. :h_a_w: What I'm not sure about is this you're trying to achieve "get the field to go multipage"? Do you mean that the field is spanning pages but it's…
-
Might I suggest you don't populate the array element with a null value in the first instance? something like : if (managerEmail != null) {ccArray.push(managerEmail);} if (customerEmail1 != null) {ccArray.push(customerEmail1);} etc.