How can I exclude Hr_Case table from cloning from PROD to NON -PROD??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2018 05:26 AM
I am currently using following sample script to delete in NON -PROD which takes a long time.
var gr = new GlideRecord('hr_case')
gr.addQuery('state',4);; //to delete all resolved HR cases
gr.setWorkflow(false);
gr.deleteMultiple();

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2018 05:40 AM
You can go to System Clone > Clone Definition > Exclude Tables on the left hand side in PROD.
Add a new record to that table and enter "hr_case" in the name field and submit.
This will exclude that table from future clones.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2018 09:58 AM
HI,
Enter the table name in Exclude table in System clone, clone definition.
Thanks,
Ashutosh Munot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2018 11:28 AM
How can you do this? Documentation states "The system cannot exclude tables that extend the Task table and are also flattened into it as part of the table per hierarchy extension model. "
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2018 01:39 PM
There are 3 options
1. Exclude the task table using the exclude tables method suggested by jon barnes, as its not possible to exclude just a child table.
2. Can you use a while loop and use gr.deleteRecord() and see if its quicker ?
3. One more easy way is to use delete all records option in the table definition, based on experience I feel its quicker compared to script