var opener = window.opener
if (opener) {
// import currentRecord module into context
opener.require(['N/currentRecord']);
// load module and assign to a variable
var rec = opener.require('N/currentRecord');
// get the module and assign to a variable
var currRecord = rec.get();
}