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

362
Vistas
Netsuite - REST API - How to create new Entry record with Token Based Authentication (TBA) - (in Python)

This is a follow up to the successful call using Netsuite Token Based Authentication (TBA) REST webservice,

I would like to get some guidance on how to create a NEW ENTRY RECORD.

Here is my custom type record entry list (please see screenshot)

enter image description here

https://gist.github.com/axilaris/4386c3537d04737d3775c156562b7545 <-- here is the python code for the TBA that has worked successful. I would like to know how to construct the next step on how to create a new entry.

This is a custom record with an ID like this customrecord1589

FYI - here is my other question on query Netsuite - REST API - Making query with Token Based Authentication (TBA) - (in Python) But this question would be creating a new entry record

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

0

Within your restlet you need to use the N/record module to create a new custom record, here is what is should look similar to:

/**
 * @NApiVersion 2.1
 * @NScriptType Restlet
 */
define(["N/log", "N/record"], function (log, record) {
    function post(context) {
        return JSON.stringify(createCustomRecord(context));
    }

    function createCustomRecord(context) {
        let success = true;
        try {
            let custRec = record.create({
                type: "customrecord1589",
                isDynamic: true,
            });
            //Set one or more fields here
            custRec.setValue({
                fieldId: "custrec123",
                value: context.custrec123,
            });
            custRec.save();
        } catch (e) {
            log.error("Error creating record", e);
            success = false;
        }
        return { success: success };
    }

    return {
        post: post,
    };
});
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