I am facing issue in ritm
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
(function executeRule(current, previous /*null when async*/) {
var gr=new GlideRecord('sc_req_item');
gr.initialize();
gr.cat_item=current.cat_item;
gr.request=current.request;
gr.requested_for=current.requested_for;
gr.opened_at=current.opened_at;
gr.due_date=current.due_date;
gr.stage=current.stage;
gr.parent=current.request;
gr.state=current.state;
var newRitm=gr.insert();
var gr2=new GlideRecord('sc_item_option_mtom');
gr2.addQuery('request_item',current.getUniqueValue());
gr2.query();
while (gr2.next()) {
var copy = new GlideRecord('sc_item_option_mtom');
copy.initialize();
copy.request_item = newRitm;
copy.sc_item_option = gr2.sc_item_option;
copy.value = gr2.value;
copy.insert();
}
})(current, previous);
I wrote this br to automatically create one more RITM but i want when i change something in one RITM then it does not reflect on another Ritm
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
@sagarpundir Not sure if I understood your question correctly. If you want to sync changes from one RITM to another, you need to write a business rule on the sc_req_item table to sync the changes between RITMS.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
what's your actual business requirement?
Regards,
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader