Not able to query the 'Item Produced Records (sc_item_produced_record)' table in Script include.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2024 04:33 AM
I am trying to query the table 'Item Produced Records (sc_item_produced_record)' in script include. I want the record producer name from the incident sysid. I wrote the below code. Here 'case_numb' is having incident sysid. But it is not going inside if loop.
But if i am hardcoding the sysid it is working fine
Can anyone help in it.
Thanks is Advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2024 09:21 AM
Could you share the entire script, in case that helps show what is going on?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2024 09:46 PM - edited 10-23-2024 09:48 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2024 04:05 AM
The only thing I see is that you have a try block without a catch, which probably isn't causing trouble, but it's also not doing anything to have this in a try block, so try it without. Also, if you haven't, try with a hard-coded sys_id as a string value in place of case_numb to make sure this Script Include can query that table. Since the two GlideRecords are not related, you could also try putting this one first. Again, shouldn't matter, but something is holding this up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2024 04:18 AM
I have added the catch block as well in my script just i did not mentioned here in the post. And i have tried using the hard coded sys_id in place of case_numb and it worked with it.