Slackbot
06/14/2019, 4:52 PMNorberto Soriano
06/14/2019, 4:52 PMKris Jones
06/14/2019, 4:56 PMNorberto Soriano
06/14/2019, 4:57 PMKris Jones
06/14/2019, 4:57 PMKris Jones
06/14/2019, 5:04 PMNorberto Soriano
06/14/2019, 5:06 PMwindow.opener.flx_cs_quore_lib().quoteRetrieval("Hello");
If I use an anyonymous function I don't have a way of identifying the function to be executedjkabot
06/14/2019, 5:18 PMwindow.opener.flx_cs_quore_lib()
Calling define doesn't permanently provide a netsuite module to your function.
The netsuite modules will only be passed to your function when define is called by the netsuite amd module loader, or when you call require.
Change your function to do this
function quoteRetrieval(response) {
require(['N/currentRecord'], function(currentRecord) {
var rec = currentRecord.get();
// rest of your code
});
}
Norberto Soriano
06/14/2019, 5:19 PMNorberto Soriano
06/14/2019, 5:47 PM