Issue Encountered in Scheduled Job: Incorrect RITM State and Resolution Notes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2024 04:42 AM - edited ‎04-17-2024 04:45 AM
Hi, in a Scheduled Job, I'm trying to create an RITM which is the parent of other RITMs. The problem is that even though I set the state to "New," when I execute the code, the RITM is created, but the state is "Closed Skipped" with resolution notes stating "Refused from wishlist." Why is this happening?
This is how the code looks like:
var reqItemGr = new GlideRecord('sc_req_item');
reqItemGr.initialize();
reqItemGr.cat_item = "loremIpsum";
reqItemGr.request = "";
reqItemGr.business_service = "loremIpsum";
reqItemGr.assignment_group = "loremIpsum";
reqItemGr.opened_by = "";
reqItemGr.short_description = "loremIpsum";
reqItemGr.opened_at = new Date();
reqItemGr.state = 1; //TODO: check why it is inserted with Status Closed Skipped
reqItemGr.insert();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2024 04:45 AM
Can you share the code so we can see what you are doing? We don't have access to your instance, so any answer is a guess.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2024 04:46 AM
I edited the question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2024 05:21 AM
If it is created on a different state, there must be code in your instance setting it to that. Are you sure it is inserted as closed skipped, and not set after insert?
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark