Auto Generate Child Tasks on Custom App

Cori4
Kilo Explorer

First, I must start this post by saying I am new to the development side of things in ServiceNow so please bear with me.  I have built a custom app for one of our departments that I need to be able to generate multiple tasks for a record from the items chosen in a list collector field on a Record Producer.  This department translates equipment documentation into other languages.  When someone request to have a document translated, it could be from 1 language up to 21 different languages.  I need to be able to auto generate a separate task for each language selected in the list collector field in my record producer.  I am not sure if this should be done through Flow Designer or a script (which I am horrible at) or business rules.  I just don’t know how to get there.

Here is what I have so far:

I have created the master table (Localization) that extends the Task table.  This table is the list of project records.

I have created the child task table (L10N Tasks) that also extends the Task table.  This table will be where the individual language tasks will be stored for the records in the Localization table.

I have created the Related Lists record to get the L10N Tasks list to show on the bottom of the Localization record form.  This does at least get me the ability for them to manually add language tasks but that would leave the task creation up to the group managing the records.  We would like this to auto create the tasks when the customer requesting the translations uses the Record Producer in the catalog to request the project.

find_real_file.png

On the Record Producer (Request a Project or Quote) I have a List Collector field that references a table (Languages) so that the requester can pick the languages (not all are listed below) they would like to convert the document to.

find_real_file.png

Is it possible for a child task (L10NTASK on the L10N Task Table) to be created when the Record Producer creates a new record (L10N from the Localization Table) and have it show in the Task list at the bottom of the new record?  One L10NTASK for each language selected?  This would be a fluctuating number of tasks per record.

I am not sure of the best way for the L10NTASKs to get generated or how to make sure they add into the Task list on the parent L10N record.  Any help or point in the right direction would be greatly appreciated.

9 REPLIES 9

Unless there is a different reference field, it appears that what you are assigning to the Parent field is the Triggered Localization Record's number. You do not need to drill down that far, just the Trigger + Localization Record should work.

Unfortunately, even with the Parent field removed from the flow, it still will not tie the parent and child tasks.  I am just looking for it to do what a basic request item, catalog task relationship does.  When you put in a request through the request module, it auto generates the ritm and the tasks automatically.  Then when you are in the ritm it shows the tasks in a table or if you are in the task, it shows the ritm in a field.  I just don't know how to build that relationship into a custom app.  Like I said, the tasks generate with the flow, they just don't seem to connect to the original record produced.

When you manually create the tasks from the main record, look to see what field is used to connect them. If it is the parent, you just need to connect the correct pill.

I just recreated your configuration and used flow designer to create the child record. It works successfully.

remove the selection of the language from your test (for testing purposes)

In your flow,

the trigger is the creation of the localization record.

the next step is an action to create the child record and you select the pill representing the localization record you just created.

I put in a log step next to log the id of the child i just created.

this works.

then go back and add the selection of the language to the flow that already works.

ggg
Giga Guru

I would put a AFTER Insert business rule on the localization record.

in script, create your child record with the language selected on the parent.

that should do it.