Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Add checklist items to Catalog Item from Flow Designer

cgedney
Giga Guru

I have a flow designer creating a Catalog Item and the user wants us to add checklist items to the SCTASK.

cgedney_0-1689708166928.png

I'm used to writing script to perform this in Workflow, but how do I do it in Flow Designer?

onTaskCreated(task.setNewGuid()); //setting the guid/sys_id of the workflow activity and calling the function here


function onTaskCreated(task){
var wfTools = new workflowTools();
var user_sys_id = '<sys ID of a user>'; //
var checklist_sys_id = wfTools.createChecklist("sc_task", task, "Check List",user_sys_id);
/* Check List: */
wfTools.addChecklistItem(checklist_sys_id, "Checklist Item 1", 1);
wfTools.addChecklistItem(checklist_sys_id, "Checklist Item 2", 2);
wfTools.addChecklistItem(checklist_sys_id, "Checklist Item 3", 3);
}//end onTaskCreated

 

Thank you for your time, Charles

2 ACCEPTED SOLUTIONS

is the "Create checklist item/record" no longer available

 

View solution in original post

3 REPLIES 3

cgedney
Giga Guru

is the "Create checklist item/record" no longer available

 

You know what, I thought I had seen it, but I could never find it. I just looked again and there it was.