Flow designer showing error "Record in sc_task table does not exist or is unreadable"

Community Alums
Not applicable

Hi,

I'm trying to create a catalog task. but its showing the error as "Record in sc_task table does not exist or is unreadable" and I noticed the task is getting created  but when I close complete this error task, its not going to the next steps and the RITM is going to close complete. Can anyone suggest why this error occurred?

 

RipunjaiGurava_0-1712311047287.png

Thanks,

Ripunjai.

5 REPLIES 5

Abhay Kumar1
Giga Sage

@Community Alums please check this article for the same error :

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0952921

hope this will help you,thanks

Harish_K07
Giga Guru

Hi Ripunjai,

 

The error usually happens on an input of an action or step. For example, if in step 1 you create a sc_task record and in step 2 you use it in a wait-for-condition, the error could happen on step 2. You need to check if the record is valid and exists. If so, also check if the type of the output of the first step. If it's a Reference and you output a String, the UI will allow this, but in the subsequent step it will result in an error.

For example:


var sc_task = new GlideRecord('sc_task');
...
var task1 = sc_task.insert().toString();
...
outputs.var1 = task1;

If var1 is a Reference, it will allow this, you won't get an error. In the UI it looks normal. But then in step 2 you use this as the input if your next step (say a wait-for-condition). It thinks it gets a Reference but instead gets a String, that's where you get that error.

Resolution

You need to ensure you pass a valid record with the right type. In this example, the code should be:

var sc_task = new GlideRecord('sc_task');
...
sc_task.insert();
...
outputs.sc_task_sys_id = sc_task;

So the output is not a String, it's the GlideRecord which is compatible with the Reference.

 

If my response solves your issue, please mark it as helpful/accepted solution.

 

Best Regards,

Harish

Community Alums
Not applicable

Hi @Abhay Kumar1 @Harish_K07 ,

I'm trying to use the OOB action for create the catalog task. Here, I'm not using the wait for condition to make wait the task. Directly I have checked the Wait checkbox in the task and I believe the above article is used for Create task action not for Create catalog task.

 

Thanks,

Ripunjai.

It happened to me once that there were ACL's which was preventing me from accessing the Task. Although the task was created, I was seeing the same error because the task is visible only to the the Assigned to or the requestor. Please check from ACL perspective, else it might be that you are sending an invalid input to the action where you're trying to close complete. Please check if the right sys_id is being passed.

 

Regards,

Harish