How do I get the additional comment variable, and the work notes from the REQ and RITM, to show on the SCTASK

velvet
Mega Guru

We have Catalog items, and the additional comment variable and the work notes are not transferring to the task.  How do I get them to transfer over?

3 REPLIES 3

Bhojraj Dhakate
Tera Expert

Hi velvet,

Find below logic for copy comments and worknotes from req to RITM table

1. Write business rule on "sc_request"

2. When : after insert/update

3. In advance section Glide into the sc_req_item Table

4.  map the field like

var grReq = new GlideRecord('sc_req_item');

grReq.addQuery('request',current.sys_id);

grReq.query();

while(grReq.next()){

grReq.comments= current.comments;

grReq.work_notes = current.worknotes;

grReq.update();

}

5. create same business rule for copy comments from RITM to SC_task.

1. Write business rule on "sc_req_item"

2. When : after insert/update

3. In advance section Glide into the sc_taskTable

4.  map the field like

var grTask = new GlideRecord('sc_task');

grTask.addQuery('request_item',current.sys_id);

grTask.query();

while(grTask.next()){

grTask.comments= current.comments;

grTask.work_notes = current.worknotes;

grTask.update();

}

Thanks,

Bhojraj

Hi,

Any Update?

Thanks,

Bhojraj

I havent had a chance to try this yet.. Working on a Convert to request button right now, High Priority... But I will try soon