My Stuff
Nominate Your Peers for NetSuite Support Community's Choice of the Quarter! Submit your nomination today.
Intelligent Payment Automation version 1.0.3 is now available in the SuiteApp Marketplace. The SuiteApp, powered by BILL, lets you automate payments, manage vendor details, and bank account information within NetSuite. Learn more
Comments
-
Hmm... might be a synchronicity issue. Try: for (var x = 1; x <= itemcount; x++) { nlapiSetLineItemValue('item', 'custcol2', x, origSO, false, true) ; nlapiSetLineItemValue('item', 'custcol7', x, customerid, false, true) ; } If that doesn't work, maybe you need to do a commit on the line item. In that case the code…
-
On the PO, you can grab the "Created From" SO internal ID, and then use that to search or load the SO and retrieve the information.
-
Use .getFieldText() (it's new since 2009.1)
-
My corrections underlined function postSourcing(<span style="text-decoration:underline">type, name</span>) { <span style="text-decoration:underline">if(name=='entity') {</span> //set value of "department" for sales order equal to value of "department" from the customer record var custname = nlapi<span…
-
Hi Yang, It is indeed a Customer record. Thanks
-
Can you post your code?
-
I'm trying to develop several scripts, but am unable to test my changes because the script seems to be cached. After running the script a couple of times, non of my changes take effect. I can modify the entire script (i.e. copy and paste another script into my js file, upload it, and run it) and the results do not change.…
-
You probably mean internalid For a list of the proper ids, refer to the Reference Guide
-
Sure, just do like try { nlapiLoaRecord('assemblyitem',recordid) } catch(Err) { //handle error } So basically try to load the item record as the type you expect (assemblyitem in this example, but whatever), and handle the error if it fails. Items share sequential internal ids across all item types, so it's impossible to…
-
No, you need the record type. BUT there are some ways to get the type when you are not sure. 1) How are you getting the recordID? If you can get that, the same source ought to be able to provide you record type, no? 2) If not, you can run an nlapiSearchRecord() on "item", filtering on the recordID. You can then get the…
-
This is from eight years ago. I don't remember. As far as I know there are no issues with ignoreMandatoryFields.
-
Sublist is "package" and field is "packageweight"
-
Yes, sublist 'member' and field 'item'
-
Hi, The error is telling you that you are trying to set an invalid internal id (21348) into the dropdown called "custbody_contractmanageratcreation". As this field is set by taking the value from "custbody_contractmgrfromsalesrep", I would verify the value of internal id 21348 in that list, and then try to find it in…
-
That's odd. Are you changing the value of a list item field, or a body field? Could the field you are changing be a "do not store value" field?
-
Is the SO fully fulfilled and ready to be invoiced? If you go on the SO in the GUI, do you see the Bill button?
-
I just checked the doc and 'status' is the correct field, 'orderstatus' is not an option. Refer to the SuiteScript Reference Guide, the Search Column section. Search column fields are not always the same as real fields.
-
You are missing a filter for mainline =true, my friend. Your 2nd line would be the same SO you just invoiced.
-
Hmm, you could try using cookies. Save your values in a cookie, read it on form init or beforeLoad. I'm not sure if you can really detect and differentiate a Save & New versus a Save.
-
Nope. Took a much more complex and annoying approach.
-
Iiiiinteresting. Thanks Yang.
-
At face value I would suggest using Units of Measure rather than the approach above. However, with enough scripting, you might be able to handle all scenarios as Steve outlines, though it is a bit messy, as you can see.
-
Yeah, Fulfillment is a fun screen to script. I don't think you should give up, cause you can probably eventually do whatever you need to. Do schedule +200% dev time though. Like you said, lots of trial and error.
-
As a side note, I would suggest you build your searches using the GUI first. It's faster and you can see the results. Then, you can recreate your search in javascript once you have it down.
-
Line item indexes start at 1, not 0. So you need to go with var itemID = nlapiGetLineItemValue('item', 'item', 1);
-
This is probably a asynchronous line updating issue. If you can wait for 2008.1 for your code, do so!! The APIs changed in 2008.1 to facilitate your life, so if this can wait for your upgrade, I highly recommend you do so. You'll notice the nlapiSet... calls now have 'synchronous' as a parameter. Otherwise, you will have…
-
Hi, That's what we do! You don't seem to have an email in your profile, so please drop me a line for further details. Thanks
-
This is a client side running on pageInit? Error handling code should be: function creditHoldAlert(type) { try { var Customer = nlapiGetFieldValue('entity'); // entity extracts the internalID number for the customer record var custRecord = nlapiLoadRecord('customer', Customer); // loads the current customer record var…
-
Err.. Hmm, step 1, get more detail from that error! Use the following code instead: try{ var Customer = nlapiGetFieldValue('entity'); var custRecord = nlapiLoadRecord('customer',Customer); var Taxable = custRecord.getFieldValue('taxable'); } catch(err) { alert(err.message); } and post what is the error message you are…
-
By category do you mean the Type, like Inventory Item, Service Item, etc? If so you can just use nlapiGetRecordType() or nlobRecord.getRecordType()