Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

296
Vistas
Accessing NetSuite modules from Config file scripts (SuiteScript)

I am trying to build a JS file to place in the file cabinet to reference my most used functions I constantly rebuild. I have been able to access it by placing the script in the file cabinet and using the @NAmdConfig to reference the functions. However, I cannot access the NetSuite modules in these scripts. I cut most of the function off in my example, but if I can return that to my original Map/Reduce script that will suffice. How can I have a third party script of my most used functions while still having access to the NetSuite modules?

/**
 * @NApiVersion 2.1
 * @NModuleScope public
 */

        var MattsFunctions = {
            dynamicTransactionSearch:
                function (sentId) {
                    var thisRecord = record.load({
                        type: record.Type.SALES_ORDER,
                        id: sentId
                    })
                    return thisRecord.id

            }
        }

I have also tried

/**
 * @NApiVersion 2.1
 * @NModuleScope public
 */


define(['N/search', 'N/record'],

    (search, record) => {

        var exports = {};
        var MattsFunctions = {
            dynamicTransactionSearch:
                function (sentId) {
                    var thisRecord = record.load({
                        type: record.Type.SALES_ORDER,
                        id: sentId
                    })
                    return thisRecord.id

                }

        }
        exports.MattsFunctions = MattsFunctions
        return exports

    })

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Figured it out. Simply pass the module over in the function you're calling, of course!

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda