This message was deleted.
# suitescript
s
This message was deleted.
n
Actually, this is a Client Script
k
Does your script have any client script entry points, e.g., pageInit, fieldChanged, etc.?
n
No, this is a Custom Module
k
I see
have you tried using an anonymous function rather than a named function for the second define parameter?
n
I need a named function since this latter is being called from a Suitelet-Popup; I use
window.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 executed
j
You have this problem only when you call your function directly?
Copy code
window.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
Copy code
function quoteRetrieval(response) {
  require(['N/currentRecord'], function(currentRecord) {
    var rec = currentRecord.get();
     // rest of your code
  });
}
👍 1
n
Let me give a shot @jkabot!
Awesome @jkabot, it worked. Thank you!!!
🎉 1