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

194
Vistas
Custom field not sourced to work order SuiteScript 2.0

Here is my code snippet for creating a work order:

var TO = record.create({
  type: 'workorder',
  isDynamic: true
});

TO.setValue({
  fieldId: 'customform',
  value: '80'
});

TO.setValue({
  fieldId: 'subsidiary',
  value: 1
});

TO.setValue({
  fieldId: 'location',
  value: 1
});

TO.setValue({
  fieldId: 'assemblyitem',
  value: item
});

TO.setValue({
  fieldId: 'quantity',
  value: qtytobuild
});

var newWO = TO.save({
  ignoreMandatoryFields: true
});

The work order is created with the right quantity to build. The component list (item sublist) is correct in terms of items and quantities. So nothing to worry about there. But, I have a custom field on the item record that is sourced to the work order component sublist (to a transaction line field). It works fine if I manually create the work order, but if I do it with my script it is not sourced. I have tried to set isDynamic:false with the same result.

Does anybody have an idea of what could be causing this?

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

0

Try setting the enableSourcing option to true on the save (this defaults to false.

var newWO = TO.save({ ignoreMandatoryFields: true, enableSourcing: true });

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