My Stuff
Comments
-
Rather than checking individual pieces and commenting on each error you can do the whole test in one shot with a regular expression: [CODE] function validateField(type, name, line){ if(name == 'custx_keynumber' && !(/^9\d{2}$/).test(nlapiGetFieldValue(name)){ alert("Key Number must be only 3 numerals beginning with a 9");…
-
There's a nice Javascript implementation of cryptographic hashing and digesting here: The title implies only MD-5 but he has implementations of SHA-1, SHA-256 and SHA-512. You can use this library to help any where cryptographic hash or digest would be helpful. HTH
-
FWIW this also works with nlapiSubmitField e.g. nlapiSubmitField(recType, recId, itemFieldId, newValue, { disabletriggers:true, enablesourcing:false }); // only affect this field There don't appear to be any more options. You can see them if you call: alert(nlapiSubmitField); HTH
-
2. Disable UEs on submit (during scheduled script execution): nlapiSubmitRecord(record, { disabletriggers : true, enablesourcing : true }) This is cool and sorely needed but where is it documented? What other fields are available?
-
You could use a button to trigger a call to a suitelet. The suitelet doesn't even need any output. Just run and trigger a redirect to the url of the record you are currently looking at. HTH Brett Knights
-
You can go to http://www.netsuite.com/portal/developers/dev-resources.shtml and get the 2009.1 developer and reference guides in .pdf format. They are a little out of date but are much more searchable than the online documentation. The online documentation is a little problematic since you can't confine your searches to…
-
Does IE work when you return a PDF from a GET request? You could test this with a static .pdf saved in the file cabinet. If so then your suitelet could save the pdf in the file cabinet and send a redirect either to the file cabinet url or itself with a url parameter that would allow you to load the file you just created…
-
two things you might want to try: 1. call sendNoCache before you send any content. 2. somehow add a parameter &dummy=.pdf to the end of the suitelet url that you post to to create the pdf. I know in the past IE often ignored the mime-type in favour of trying to decide what the type was by the extension.
-
'group' is a search filter nlapiSearchRecord('customer', null, [ new nlobjSearchFilter('group', null, 'anyof', [48625]), //cannot use 'is' even for single group new nlobjSearchFilter('isinactive', null, 'is', 'F') ]);
-
Mark, getAllFields is still there and is a method on nlobjRecord. I believe it still only returns changed fields when you use it on a record obtained with nlapiGetNewRecord but it does return all field names when used on a record obtained with nlapiLoadRecord. (had to check this after your statement that it might be gone.…
-
Excellent! You don't really need two suitelets though. You can have all the code running in a single deployment. When handling the post you can redirect back to the same suitelet, add what was necessary to generate the PDF and add a parameter to indicate that you want the generated PDF rather than the form. HTH
-
This is client side code run in Firefox using the firebug extension with large command line mode turned on. It's a great way to test scripts. The available Netsuite API is whatever client side API that is loaded for the page type you are on. e.g. viewing end editing a scriptable record.
-
The samples are from working code. The problem is you can't perform any useful query by an item's site category so you have to use other means to decide what should be on a category. There are various means to do that though depending on how you want to assign items to categories. It's a pretty open ended discussion about…
-
These are quite different things. The script I posted is to help you assign/de-assign items from categories when doing web site set up. It could be adapted to be part of a User Event script that would maintain an item's category assignments when the item is added/edited in Netsuite itself. Your script forces the left hand…
-
Chuck, Have you considered saved searches? A saved search can automatically include an item based on your criteria and can present and sort items based on arbitrary columns. (I believe sorting didn't used to work but it does now in at least one test account.) If there's some reason you can't use a saved search it is…
-
Laura, You can fairly easily use a scheduled script to assemble a csv from the results of a saved search. The script can be set to run once a day near a time you specify. The csv could be sent as an attachment to an email.
-
Laura, You need to write the script according to the SuiteScript API help. It's online. If you've never done any coding this might be a little daunting but being able to code opens up a lot of possibilities with Netsuite. If you are not comfortable with scripting and you need to email or post a CSV file on a particular…
-
Not a coding style I care for but that'll work. If you are going to set this up once and never change it taking this approach is ok. Changes are a problem here. since you have to make sure you match the header name and row value. A more modular approach is to define your header and results in a data structure: e.g. var…
-
I believe you should be able to use the following code fragments to get the values you are looking for. Note I don't think the first example gives anything useful but was quick to write. You may be able to think of a way to use built-in aggregates to come up with the same results as the second example. var x=…
-
Steve, Thanks for documenting this. Did you by any chance figure out how to relate the message record to a campaign?
-
Thanks Yang, nlapiSendEmail and nlapiSendFax have records arguments but there isn't any way I can see to attach a message sent through 3rd party delivery. nlapiAttachRecord could have this ability but if it does it's not currently documented.
-
I know this is an ancient thread but it's the first one that comes up when searching nlapiAttachRecord and access. I found the following snippet works: var isAttached = nlapiSearchRecord('customer', null, [ new nlobjSearchFilter('internalid',null, 'is', spec[0]), new nlobjSearchFilter('contactrole', 'contact', 'is',…
-
You could certainly use a deposit for this and with scripting the process could be made quite painless. Basically you'd take the authorization from the SO (actually the amount and pnRefNum) and could use that in the customer deposit record to bill the card. That would hit whatever deferred revenue account you designate.…
-
Thanks! I'd stared at that a couple of times and didn't make the connection
-
I'm guessing you should use the expCostList for this rather than item list items see https://system.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2018_1/schema/other/invoiceexpcostlist.html?mode=package
-
Hi Paul, When you do mass update of a price level you should see a drop-down labeled "Based On" from which you can select "Entered Cost". Do you have that? It seems that would be what you are looking for.
-
Why not let them place the order but warn them that "You will be contacted by customer service to verify your order before it is processed" Then you have some javascript in the cart to detect the order total: var rawTotal = "<%=getCartTotal()%>".replace(',', '').replace(/.*([d.]+)/,' Why not let them place the order…
-
BTW It looks like a similar issue has cropped up in the same time frame: https://usergroup.netsuite.com/users/showthread.php?t=22268
-
Customer just reported seeing the same thing. Shopping cart shows custom transaction column field as populated. User goes through payment and shipping screens and column fields still populated on final Place Order screen User places order and custom transaction column fields are empty on confirmation page and empty on…
-
Hello, the way I'd do this would be to create a hidden transaction body webstore field that is sourced from the customer. The value sourced from the customer could be a default discount % or a default discount item. Then I'd enable scriptable checkout to use the sourced value to set an order discount. The script below is…