To get Sys ID of parent task.

Mohd Kashif Bei
Kilo Contributor

I have created a new relative list and created a new relation between two modules.
My requirement is to fetch the sys_id of the parent task into the child task, whenever a new record of the child has been created.
What client script should I write, so that the Number of the parent task is populated automatically into the child task.

9 REPLIES 9

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

is Audit finding table having reference to Audit log?

if yes then when you click New the Audit log should auto-populate

how is the related list defined? is it OOB or defined relationship?

Regard
Ankur

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

No it is not OOB. I have created a new relationship.

Audit Log - fm_expense_line_breakdown

Audit Finding - fm_expense_allocation
find_real_file.png

try using current.addQuery('sys_id','IN',ids.toString());

Hi,

So what's your query?

Above script is not working fine?

OR

Audit log is not getting populated when clicking New button

Regards
Ankur

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