Retrieve work note from RITM

priyanka1028
Tera Contributor

Hi Team ,

 

I have one requirement where I need to retrieve the work note comment when RITM is closed and the date and time when it is added on RITM work note.

Please help me by providing your answer.

11 REPLIES 11

hi @priyanka1028 do you have any worknotes present in RITM? did you pass correct sysid and state value?

Ran in PDI works fine

HarishKM_0-1708682168388.png

 

Regards
Harish

Yes, I have system work note present in RITM

Hi @priyanka1028 then check the query, verify sysid and what is the state of RITM? comment this line in script

//ritm.addQuery('state',3); //comment this line and test

Regards
Harish

I mean when RITM gets closed the system added comment I want to fetch

Hi @priyanka1028 what you want to do with worknotes? are you updating it some where?

in that case create a after update BR on sc_req_item table

Cond: State changesto Close complete

script

var wn = current.work_notes.getJournalEntry(1);

// then your logic here what you want to do with worknotes?

Regards
Harish