The CreatorCon Call for Content is officially open! Get started here.

Linking RITM to a CHG

dianeramos
Tera Contributor

We have a requirement to link RITM to a CHG record.

We are able to do this, but there are cases when an RITM needs to be linked to 2 CHG records.

Scenario: When RITM123 is linked to CHG123, and we link the same RITM123 to CHGXYZ ---- the link is broken on RITM123 and CHG123. It behaves like an RITM is only allowed to be linked ONCE.

How can I change this to allow it to be linked multiple times? 

Thanks in advance

32 REPLIES 32

Code seems to be correct, can you cross check the state value in ritm table var gr = new GlideRecord('sc_req_item'); gr.addQuery('sys_id',current.parent); // ritm vale from change request gr.query(); while(gr.next()) { gs.log('parent id', current.parent.getDisplayValue()); gr.state = 4; gr.update();}

Use this code now.

getting same thing no changes as of now 

What log value you got and you tried with updated code right?

Gagan10
Giga Contributor

getting change request number

Can you share the screenshot of the script and the related list of the ritm