- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2020 03:41 AM
Now attachment , attached to Data source while auto load but tranformation process not happing.
Do I need to timer kind of think?? Or I missed any think
Ui action Script:
function importQC(){
var answer = confirm('Have you attached spreadsheet');
if(answer==true)
{
gsftSubmit(null, g_form.getFormElement(), "fj_import_qc");
}
}
var gr2 = new GlideRecord("sys_attachment");
gr2.addQuery("table_sys_id", current.sys_id);
gr2.addQuery("table_name", "x_fdrbl_business_p_bpm_task");
gr2.query();
if (!gr2.next()) {
gs.addErrorMessage("You must attach a file to submit. Your import submission has been aborted.");
current.setAbortAction(true);
}
else{
GlideSysAttachment.copy(current.getTableName(), current.sys_id, 'sys_data_source', 'a5226c1e1b7f181069e7a9342a4bcbdf');
var exportGr = new GlideRecord("scheduled_import_set");
exportGr.addQuery("sys_id", "bd553cf2db7f9810b22061f74b9619ec"); // sys_id of the record which you will be creating for scheduled import in step
exportGr.query();
if (exportGr.next()) {
//gs.executeNow(exportGr); // this is for scoped app
SncTriggerSynchronizer.executeNow(schImp_GR); // this is for non scoped app
}
}