Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Add a task to a ITAM Purchase Order

clktester
Tera Contributor

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. 

 

 

1 REPLY 1

Not applicable

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;