Why can't I place sys_data_source as a table for my Record Producer?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2025 09:16 AM
On Washington Release, I've built the very same Record Producer to do a Mass Registration of items on a table using a Transform Map and Scripts. The main reason that I could do this was that I was able to place the sys_data_source table as the reference table of the RP to generate the record, but now in Xanadu release I just can't seem to pick it. Any recommendations on how to proceed?
 
My code:
var saGR = new GlideRecord('sys_attachment');
saGR.addQuery('table_sys_id', current.sys_id);
saGR.addQuery('table_name', 'ZZ_YYsc_cart_item');
saGR.query();
//Attachment validations...
if (!saGR.next()) { //verify if has an attachment or it's empty
gs.addErrorMessage('you must attach the attachment');
current.setAbortAction(true);
producer.redirect = "replace this with your RP URL";
javascript_abort();
} else {
var sysAttachmentId = saGR.getUniqueValue();
if (saGR.getRowCount() > 1) { //verify if has more than 1 attachment
gs.addErrorMessage('you must attach only one file at a time');
current.setAbortAction(true);
producer.redirect = "replace this with your RP URL";
javascript_abort();
}
gs.addInfoMessage('Done checking the file');
var importSetTableName = 'u_user_data';
var transformMapSysIds = '33f41767c348da10a1c21cedd40131d4';
current.name = 'User data import';
current.import_set_table_name = importSetTableName;
current.file_retrieval_method = 'Attachment';
current.type = 'File';
current.format = 'Excel';
current.header_row = 1;
current.sheet_number = 1;
var dataSourceId = current.insert();
saGR.table_name = 'sys_data_source';
var updateAttachment = saGR.update();
saGR.table_sys_id = updateAttachment;
var loader = new GlideImportSetLoader();
var importSetRec = loader.getImportSetGr(current);
var ranload = loader.loadImportSetTable(importSetRec, current);
importSetRec.state = 'loaded';
importSetRec.update();
var transformWorker = new GlideImportSetTransformerWorker(importSetRec.sys_id, transformMapSysIds);
transformWorker.setBackground(true);
transformWorker.start();
gs.addInfoMessage('The user data is imported successfully');
current.setAbortAction(true);
}
function javascript_abort() {
return;
}
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2025 07:28 PM
Hi @Ariadne_Lessa ,
"sys_data_source" Table belongs to Global Scope, when you change the application Scope to "Global", then you can have "sys_data_source" table as a option to choose, see below :
By Default, this table is not avaialble for use from any other scope:
So, if you want to use it from your scoped app, you need to allow the access, something like below:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2025 10:34 PM
you developed the record producer in other scope and when you upgraded to Xanadu did that table got cleared up?
If you are planning to develop fresh from other scope then check the steps mentioned by @Community Alums
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader