How to duplicate a HR case including activity log?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2024 05:17 AM - edited 08-04-2024 05:18 AM
Just wondering if anyone has a UI script to hand for duplicating a HR case including activity log?
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2024 05:19 AM
why so? whats the need of duplicate case.?
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2024 05:38 AM
Just want to have some dummy data for test purposes and I'm new to SN scripts.
Created this but yet to test:
var gr = new GlideRecord('sn_hr_core_case');
gr.initialize();
gr.short_description = current.short_description;
gr.assignment_group = current.assignment_group;
gr.work_notes = current.work_notes.getJournalEntry(-1);
gr.insert();
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2024 05:43 AM
instead of
gr.work_notes = current.work_notes.getJournalEntry(-1);
You need to gliderecord the sys_journal table and copy the records.
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....