//Copiar datos de una tabla a otra
//Copy data between diferents tables and fields.
var gr = new GlideRecord('Table_source'); gr.addQuery('namefield','ID_field'); gr.query(); while(gr.next()){ var task = new GlideRecord('Table_destination'); task.addQuery('sys_id', gr.id); task.query(); if(task.next()){ task.field_source = gr.destination_field; task.update(); } }
No hay comentarios:
Publicar un comentario