My Stuff
Comments
-
Do you have any client scripts deployed to your Deposit record? NetSuite could be trying to execute it server side when it creates the new record.
-
There is no question about it.. messing with the DOM is pretty high in the list of NetSuite bad practises. And they are already talking about another UI refresh.. But on the other hand, I think creating your own "component" that lives inside an inline html field with targeted CSS is ok
-
It definitely does smell like a NetSuite defect Have you tried creating the record in standard mode instead of dynamic?
-
Changing pricing via script will be different depending on which pricing features you have enabled in your account (Multiple Currencies / Multiple Prices / Quantity Pricing) https://system.na2.netsuite.com/app/help/helpcenter.nl?fid=section_1502207768.html Try this if you have all three features active…
-
This was possible in SS1 as there were no entrypoints, but with SS2 and scriptContext available only within entrypoints many such calculations cannot be performed and needs to be done multiple times in different entrypoints - this makes for a shoddy performance if there are complex routines requiring multiple searches. You…
-
You have to love NetSuite documentation. :h_a_w: [ATTACH=JSON]{"data-align":"none","data-size":"custom","height":"381","title":"Image 25.png","width":"549","data-attachmentid":428605}[/ATTACH]
-
Another major pain for me has been working with ui dialog and message. They all run asynchronoulsy which make them useless for client side validation, which is like 50% of the use cases. Can NetSuite provide a synchronous option to display these. Dialog looks SO much better than alert. +1, but I think instead of a…
-
It may be that the field you are trying to access is a line-level item. Then you would have to use the getSublistValue() and getSublistField() methods instead. I haven't tried though, it may not be possible to hide a field on the line level. var field = context.currentRecord.getSublistField({ sublistId: context.sublistId,…
-
It's passed in as part of the param object /** *@NApiVersion 2.x *@NScriptType Portlet */ require(['N/record'], function(record) { function render(params) { var entityid = params.entityid; var recordObj = record.load({ type: record.Type.CUSTOMER, id: entityid }); } return { render: render }; });
-
SuiteScript doesn't offer a supported way to show or hide fields in client scripts. But you have a few options: Actually SS2.0 does, with the N/currentRecord#Field.isDisplay property. In SS1.0 you had to use the undocumented nlapiSetFieldDisplay(), BUT if you wanted to do it in a "supported" way you could hide a field with…
-
console.log(context.currentRecord.getField({'field Id': 'isexempt'})) //logs null You have an space between field and Id that shouldn't be there
-
I ran your code and it worked as expected - generating a PDF version of the transaction in the SuiteScripts folder. In any event, perhaps a cleaner way of inserting your custom content into the PDF is to use a custom field. You can use a script to populate the field with your dynamic content, and then just output it in the…
-
Well in other news, concurrent Suitelets are going to be much more restricted in the next release as well.
-
As a workaround you can use a formula criteria: var srch = search.create({ type: search.Type.CUSTOMER, filters: ["formulanumeric: CASE WHEN {phone} LIKE '" + phone + "' OR {altphone} LIKE '" + phone + "' OR {mobilephone} LIKE '" + phone + "' THEN 1 ELSE 0 END", "equalto", "1"], columns: homeSearchCols });
-
You are testing the performance of 5 netsuite queues vs 50 concurrent connections to a suitelet? This seems a little unfair. Assuming that the map/reduce scales linearly, with 50 queues it would do 510 records per second which is higher than Apache JMeter. I think that the key point here is that the 50 concurrent Suitelets…
-
A workaround to do this now is to use your User Event script to set a client script, and then use the client script to display the message.
-
I think the way to do it is: serverResponse.setHeader({ name: 'Content-Type', value: 'application/json' });
-
The script context gives me the currentRecord, so do I really need to import the currentRecord module? You don't, as long as you are in an "entry point client script", currentRecord is automatically imported and available in the context. https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4625600928.html (I just…
-
david.smith I did not realise it was only the UI library being removed. Does that mean that I can still use jQuery in scripts? You can (and I do), but just like the case with jQuery UI, it's only there because Netsuite was using it internally, and so there are no guarantees that it won't be removed or the version changed…
-
You need to set the isDisabled property on the field. require(['N/currentRecord'], function(currentRecord) { var record = currentRecord.get(); var field = record.getField({ fieldId: 'entity' }); field.isDisabled = true; });
-
Also, I thought that when you issued this type of command from the console the event type was XEDIT. However, the first line of my beforeSubmit trigger is an execution log that is reporting the event type as EDIT.! This might be due to the field not actually being 'Inline Editable', in which case nlapiSubmitField() will…
-
From what I can make out of the documentation, it sounds like you would access files via context.request.files.custom_file https://system.netsuite.com/app/help...314805947.html
-
Have a look at the "Custom Modules Examples" section in the documentation, particularly the "Add a non-AMD library" section https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4704111062.html
-
If the information that you want to retrieve can be found on the company information, you can use config module to load the information using var compInfo = config.load({type: config.type.COMPANY_INFORMATION}) and a conpInfo.getValue('custscript_paramaters') I think that should be config.Type.COMPANY_PREFERENCES, not…
-
Also the code samples in the documentation for the N/config module are incorrect. The options object for setValue / getValue should have a fieldId parameter, not name. I would submit a Defect to support, but I don't have the patience at the moment :h_a_w: https://system.netsuite.com/app/help...261803800.html /**…
-
FYI, Netsuite documentation has a section "SuiteScript 1.0 to SuiteScript 2.0 API Map" which is very helpful in finding the new API's. https://system.netsuite.com/app/help/helpcenter.nl?fid=chapter_4752722762.html
-
SS1.0 var value = nlapiGetContext().getSetting('SCRIPT', 'custscript_parameter'); SS2.0 var value = runtime.getCurrentScript().getParameter({name: 'custscript_parameter'})
-
I haven't worked with Assistants in SS2.0, and the documentation there is very lacking, but have you tried - assistant.currentStep = assistant.getNextStep();
-
In 1.0, you can nlapiGetFieldText to get the text value of a list/drop-down field. I tried using record.getText but I get this error: "name":"SSS_INVALID_API_USAGE","message":"Invalid API usage. You must use getValue to return the value set with setValue. " Not sure if it has any relevance but the field I am using it…
-
For ad-hoc debugging you can use the Chrome Developer Tools "Snippets" feature (note this needs to be run on a page with record in Edit mode): [ATTACH=CONFIG]n418217[/ATTACH] For debugging existing scripts, you can insert a JavaScript "debugger" statement into the code to create a breakpoint, Alternatively you can…