My Stuff
Comments
-
If anyone needs to send a notification email when they create a task, here is my solution:[LIST=1] [*]Create an email template with custom merge tags [*]merge the data with the template [*]send the email[/LIST]Simple. The email template (created from the source of the NetSuite sent email) The following task has been…
-
Sorry - this is a fact of life in order to ensure that read-consistent data is submitted to the system for updates. I don't really know how else to explain it. Now I feel like I'm being thick headed. Although it may *seem* like I'm arguing, I'm really just trying to ask why the record isn't handed to post-save scripts in…
-
Yes, the nlapiGetNewRecord in AfterSubmit is read only. You need to use nlapiLoadRecord using the id of the record to have write access. I'm curious if NetSuite could comment on why this is? It's causing a lot of extra DB activity and for the life of me I can't think of a reason the record is returned as read only. Anyone…
-
Hi and thank you for the reply. Yes, I can use nlapiSendEmail() but why should I have to? Whenever possible I like to let NetSuite do "it's thing" and mimic the UI usage with script. I have been using nlapiSendEmail, but would prefer if NetSuite respected the value of 'sendemail'. -Steve
-
Yang, thanks for sticking with it :) In an afterSubmit script, you take the record that was submitted (with no rep assigned) and you submit it I think this is the crux of my misunderstanding; Why is the rep unassigned? Why would the record be returned before all post (pre?)-processing is complete? I suspect that operations…
-
Hi Yang, Thanks fot the response. I remember coming across a post (I think by you) that explained the event cycle of record DB transaction and the SS events that are raised. From what I remember the after submit event is raised after the record has finished being written to the database. The current workaround of loading a…
-
If these are business critical scripts, sometimes you have to do ugly things ;) How about creating a custom record to hold a "Script has completed" flag as well as a date/time setting. You then could schedule 3,4,5...20 scheduled jobs at different times (I don't know if this is possible, all my scripts are UE scripts) that…
-
Yes this is not recommended since you would have to manually recalculate all the totals yourself. This might explain why the UE error is being thrown. Can you try doing this in Client SuiteScript? Thanks, Yang I've just run into the same problem. I can't change the pricing in a client script because the records are created…
-
Nice one Yang! I was watching some videos on Yahoo featuring Douglas Crockford and this reminded me of one of his "tips": Rather than concatenation (which apparently is not very performant in JS) use an array then join to get the result. For example: function wrapSoapAddressBody(address1, address2, citystatezip) { var soap…
-
I was seeing strange performance results with using an array to concatenate strings so I did a quick (SIMPLE) benchmark: Code: var start, end; var concatBuffer = ''; var arrayBuffer = []; start = new Date(); for(var i = 0; i < 10000; i++) { concatBuffer += 'The quick brown fox'; } end = new Date(); var duration =…
-
Hi Yang, No. RECORD_IDS.PHYSICIANS_ORDER is the external id (??) of the record (EG: customrecord_phys_order) I'm confused by this. We use the string id of records and fields all over the place in SS, then... for some reason when attaching to records we need to use the internalID (PK?)? Why is this? Are there plans to…
-
I've tried every variation I can think of to get this to work. Here is what I have right now: var attachRecord = new Array(); attachRecord['recordtype'] = RECORD_IDS.PHYSICIANS_ORDER; attachRecord['record'] = 1;//record.getId(); nlapiSendEmail('-5', 'steveklett@gmail.com', 'Physician Order Request', body, null, null,…
-
I've been following your suggestion to specify default values in the url by field id and I'm having trouble with the message form. For example: https://system.netsuite.com/app/crm/common/crmmessage.nl?&l=T&entity=751&templatetype=FAX&template=14&defaultfax=111-111-1111 I added: &template=14&defaultfax=111-111-1111…
-
Thank Yang, I thought I had tried recalc, but I must not have as it does exactly what I want. In case anyone is in a high volume situation using integrated shipping and want to work around the need to click the "Calculate Shipping" button you can do this: function OnRecalc() { // If there are any lines items, calculate the…
-
Have you tried just 'name'? This is what I use to retrieve the name field from a custom record.
-
No, I never found a workaround. I moved on after this post, it wasn't critical that I had this working so I moved on to other fires and train crashes ;)
-
We are planning to support memorized transactions in SuiteScript in the next release. Nital, Not sure what events will be raised when a memorized transaction 'matures' but it would be vital (for me) that an event be raised BEFORE the transaction is pushed out. I've implemented a complex system to mimic the memorized…
-
well, i meant via suitescript or web services. but it's okay. i figured out my answered--it's not possible. memorized transactions are its own separate record type that just refers netsuite to the actual transaction (estimate, invoice, etc.). currently, memorized transactions are only available through the UI. thanks for…
-
I modified your code slightly and it runs ok for me. Hope this helps.. -- Don catch (err) { //nlapiLogExecution('DEBUG', 'Raw value of caught exception', err); var errMessage = err; if(errMessage == '[object nlobjError]') { var Message = errMessage.getDetails(); } nlapiLogExecution ('DEBUG', 'Error: ' + Message); } Hi Don,…
-
I have the same problem with nlobjerror.getDetails(). nlobjerror.getCode() gives some information, but not as much as nlobjerror.getDetails used to. Do you have any idea when it stopped working?
-
try; discountitem inventoryitem markupitem noninventoryitem paymentitem serviceitem subtotalitem Strangly if you have an item of type 'Other Charge' it will be loaded if you use type 'noninventoryitem'. As for seeing the errors..... You can catch the exception/error in a try/catch block then insepect the catch arg for it's…
-
You can query the column names using the nlobjSearchResult.getAllColumns() function. You may also need to specify the correct join in your getValue statement. I usually collect the column names into an array ahead of time as follows. -Dan function testPortletSavedSearchResults() { var results, columns, value, i, j; var…
-
If you need to find the values of such lists and they aren't in the documentation you can usually snoop around in the page source (make sure you are in edit mode) and find the values. For example, doing a find for "shipped" on an item fulfillment form will come up with this bit of code: ['Picked', 'A', 'Packed', 'B',…
-
I have a situation that I'm not sure how to handle. We are sending out an email to the primary contact of a customer. Using the attach record to messages parameter definitely works, but I can't seem to connect to BOTH the contact record AND the company record the contact belongs to. Since both are 'entity' records, the…
-
I was wrong, they don't return the Id. Sorry, my mistake... I thought they did. They should.
-
why would this not be in the documentation? how would anyone possibly be able to figure this out just out of nowhere? netsuite needs to get their act together. I don't mean to bash anyone, but god is he right. I just wasted 1.5 hours on a Saturday night trying to get this to work. No one likes to do that...
-
wow, I feel pretty lame ;0) I had come across an example somewhere that showed the useage I was using so I just assumed it was correct. (You know what happens when you assume...) removing the first parameter cleared the error, but it still not working. It appears to be replacing the first instance of "<br>" but ignoring…
-
I've just run into this same problem. I must run my script after submit as I need the transaction ID. here is my code: /* --------------------------------------------------------------------------- * * Collect required data from an invoice and compose an email to be sent to a * 3rd party billing company. * *…
-
hah! Fantastic! I learned too. Cool. Thanks for the help and have a good one, Steve
-
nlapiGetFieldText is only available in client SuiteScript for select/multiselect fields. You could perform a search for it and use nlobjSearchResult.getText( name ) to return the display name. Alternatively, you could use a new function (by popular demand) added in 11.0.4: nlapiLookupField( type, id, field(s), text ) i.e.…