Add a task to a ITAM Purchase Order
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2024 10:17 AM - edited 09-01-2024 10:41 AM
Using OOB ITAM Purchase Order form, I've created a catalog item to request a Purchase Order.
I would like to generate a series of Catalog tasks that show in the related lists on the proc_po form.
I've been able to create a relationship from the proc_po table to the sc_task table, then add it to the proc_po form and see it.
I can click New on this related list and create an sc_task manually and that works.
I've added a field to the sc_task table called Purchase Order and made that a reference field to the proc_po Number field.
I just can't see that task in the related list, even though it's there.
I am not certain what to put in the relationship script field to accomplish this.
Thank you in advance if you have any ideas.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2024 02:59 PM
Hi @clktester ,
You can try the below script-
var gr = new GlideRecord('sc_task');
gr.addQuery('proc_po_number', current.sys_id); // 'proc_po_number' is your reference field in sc_task
gr.query();
return gr;