Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

294
Visualizações
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 Respostas
Responde à pergunta

0

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

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda