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

166
Vistas
RCRD_DSNT_EXIST","message":" There are no records of this type - Extended

Okay everyone, very much through the looking glass on this one. Many thanks to Barmar, Kryton and bknights whose wisdom has helped get me this far.

The script has changed and is now below. I can upload it and generate a script record and it does actually attempt to run, but now I am getting this error:

"type":"error.SuiteScriptError","name":"RCRD_DSNT_EXIST","message":"There are no records of this type.","stack":["createError(N/error)","initiateWorkflow(/SuiteScripts/grn20.js:9)"],"cause":{"type":"internal error","code":"RCRD_DSNT_EXIST","details":"There are no records of this type.","userEvent":"aftersubmit","stackTrace":["createError(N/error)","initiateWorkflow(/SuiteScripts/grn20.js:9)"],"notifyOff":false},"id":"","notifyOff":false,"userFacing":false}

But the record definitely does exist, the ID number and workflow ID are as specified in the workflow.

What else could be causing this problem?

Thank you in advance for any suggestions!

Edit - I have been told that the record ID below should refer to the internal ID of the item, this makes no sense, the workflow I am trying to initiate is designed to change fields on multiple items, why would I need to specify a single item in the script?

Edit 2 - Reposted as I am not sure questions show in feeds if they have been answered.

/**
 * @NApiVersion 2.x
 * @NScriptType UserEventScript
 */

define(['N/workflow', 'N/search', 'N/error', 'N/record'],
    function (workflow, search, error, record) {
        function initiateWorkflow(scriptContext) {
               var workflowInstanceId = workflow.initiate({
                recordType: 'inventoryitem',
                recordId: 35,
                workflowId: 'customworkflow14'
            });
            var inventoryitemRecord = record.load({
                type: record.Type.INVENTORY_ITEM,
                id: 35
            });
        }
        return {
            afterSubmit: initiateWorkflow
        };
    }); 
about 4 years ago · Juan Pablo Isaza
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