stalbert
04/18/2018, 2:53 PMnsSearchResult2obj()
and use it in plain JS. Feel free. Just take that single _.reduce line from https://github.com/ExploreConsulting/netsuite-fasttrack-toolkit-ss2/blob/master/search.tsstalbert
04/18/2018, 2:54 PMkarlenigma
04/18/2018, 2:55 PMstalbert
04/18/2018, 2:55 PMalien4u
04/18/2018, 3:01 PMkarlenigma
04/18/2018, 3:03 PMkarlenigma
04/18/2018, 3:04 PMkarlenigma
04/18/2018, 3:04 PMstalbert
04/18/2018, 3:11 PMresultToObject
are determined. Two things I would try for comparison: 1. run this search in SS1.0 and see if it's magically faster. 2. try using lodash _.map
rather than native Array.map in translate()
karlenigma
04/18/2018, 3:17 PMkarlenigma
04/18/2018, 3:17 PMalien4u
04/18/2018, 3:28 PM_.map
is like 7% faster than native map
so I will also check _.keysIn
because that could potentially replace my for (Key in Object) lines...thatguymikeneal
04/18/2018, 3:32 PMvar recordParam = record.load({
type: 'customrecord_supported_record_types',
id: runtime.getCurrentScript().getParameter("custscript_record_type")
}).getValue('custrecord_record_name');
but when the script runs i get "name":"SSS_MISSING_REQD_ARGUMENT","message":"load: Missing a required argument: id",
it ran fine outside of the map/reduce if i tried it on a normal debug script, but dont know why its causing issues nowthatguymikeneal
04/18/2018, 3:33 PMstalbert
04/18/2018, 3:35 PMalien4u
04/18/2018, 3:36 PMstalbert
04/18/2018, 3:38 PMstalbert
04/18/2018, 3:39 PMalien4u
04/18/2018, 3:39 PMstalbert
04/18/2018, 3:42 PMstalbert
04/18/2018, 3:44 PMCaleb Fong
04/18/2018, 3:45 PMN/log
required, and loaded, but I'm not seeing my .audit
messages show up in the script deployment.
define(["N/search", "N/ui/serverWidget", "N/log"], function(nss, nsui, nslog) {
/**
* Definition of the Suitelet script trigger point.
*
* @requires N/search as 'nss'
* @requires N/ui/serverWidget as 'nsui'
* @requires N/log as "nslog"
*
* @param {Object} context
* @param {ServerRequest} context.request - Encapsulation of the incoming request
* @param {ServerResponse} context.response - Encapsulation of the Suitelet response
* @Since 2015.2
*
*/
function onRequest(context) {
nslog.audit({ title: "Request Recieved" });
context.response.writePage({
pageObject: renderList(find_Fulfillments())
});
}
stalbert
04/18/2018, 3:45 PMstalbert
04/18/2018, 3:46 PMstalbert
04/18/2018, 3:47 PMstalbert
04/18/2018, 3:48 PMCaleb Fong
04/18/2018, 3:48 PMstalbert
04/18/2018, 3:49 PMjkabot
04/18/2018, 3:49 PMCaleb Fong
04/18/2018, 3:49 PM