Workflow, CI Task, SysID

CyrillW
Tera Contributor

Hey,
I have a workflow based on the outdated workflow (workflow_ide.do).
In it, I have a ‘Create CI Task’.
Now I want to get the SysId from the newly created task and put it in the scratchpad.

I get an ID, but this ID does not exist.
Attached are some images.

 

 

CyrillW_0-1760431463075.png

CyrillW_1-1760431479851.pngCyrillW_2-1760431493171.png

 

CyrillW_3-1760431531404.png

 

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@CyrillW 

you cannot get it directly.

you need to query sc_task table with your RITM number and then get sysId.

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@CyrillW 

you cannot get it directly.

you need to query sc_task table with your RITM number and then get sysId.

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Thanks, but I don't have any RITM about it -> it's a workflow that waits for a record to be updated in a table...

@CyrillW 

then this task is created against which parent?

Usually sc_task records are created under RITM. so it has linkage with it.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hey, that's true, but I was misusing sc_task. I'm now using the normal task -> I simply stored a cmdb_ci and query it. Nevertheless, thank you very much for your help and your food for thought.