Run transform in server side script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2015 12:00 AM
Hello All,
Is there any way to "run transforms" in server side script? any APIs?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2015 12:06 AM
SncTriggerSynchronizer.executeNow(rec);
Look at this thread for more details :Re: Is it possible to kick off a schedule import from a script?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2015 12:08 AM
Hi Sumeet,
You may find the below thread helpful.
Re: Is it possible to kick off a schedule import from a script?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2015 12:59 AM
Example code:
igr = your import set GlideRecord
transformMap = your transfrom map GlideRecord
var t = new GlideImportSetTransformerWorker(igr.sys_id, transformMap.sys_id);
t.setProgressName("Transforming: " + igr.number + " using map " + transformMap.name);
t.setBackground(true);
t.start();
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-08-2017 08:44 AM
Hi Paul, how did you create a GlideRecod of the trasnform map? This is what I have been trying:
function transform(){
var imports = [];
var record = new GlideRecord('demo_import');
record.query();
imports.push(record);
var tables = [];
var target = new GlideRecord('Demo transform');
target.query();
while(record.next())
tables.push(target);
}
I am attempting to put the import set in an array and the transform map in an array. 'demo_import' is the name of the import set and 'Demo transform' is the name of the transform map.