Abort the scheduled data import through Pre-script script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2023 06:52 AM
I need to abort the scheduled data import from Excel, based on checking headers of imported Excel sheet.
From Below script I'm able to get the headers name in system logs but cannot find a funtion which I can call inside the if(header1 != 'Allocation Logic') to abort the import submission.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2023 08:54 AM
@ankit19 Did you try the following?
current.setAbortAction(true);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2023 09:07 AM
@Sandeep Rajput Thanks for your response.
I have tried below code, but didnt worked.
if(header1 == 'Allocation Logic'){
gs.info("headers from sheet header2" + header1);
current.setAbortAction(true);
}
Able to get the info msg in logs.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2023 09:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2023 09:13 AM
@thomaskennedy Thanks for your response.
I have tried below code, but didnt worked.
if(header1 == 'Allocation Logic'){
gs.info("headers from sheet header2" + header1);
cancel = true;
}
Able to get the info msg in logs.
Thanks