Transform map script to stop updating old records in RITM table.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-18-2024 02:39 AM
HI Team,
I want to know the script to stop updating/reopening closed RITMs(closed one year ago) due to customers feedback from happy signals integration.
i tried to put the logic like:
setting condition in the onbefore Transform script to stop RITM getting updated but it is not working for me.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-18-2024 03:31 AM
Hi @Ssaini1,
Try below script, I hope it may help you
var req = new GlideRecord('sc_req_item');
//request item which was closed last year
req.addEncodedQuery('closed_atONLast year@javascript:gs.beginningOfLastYear()@javascript:gs.endOfLastYear()');
req.query();
if(req.next()){
ignore = true; // ignore the transform map
}else{
source.u_test_1 = target.u_test_1;
source.u_test_2 = target.u_test_2;
}
If my response helps you to resolve the issue close the question by Accepting solution and hit thumb icon. From Correct answers others will get benefited in future.