- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2022 10:20 PM
Hi all.
If i am changing the parent state and on hold fields then i need change the child state and on hold fields.
for this I using after business. But getting results.
Can you help me on that.
Can please refer attachment for my business rule .
Thank you
Solved! Go to Solution.
- Labels:
-
Incident Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2022 10:26 PM
Hello
Please change the script like this..
var incident = new GlideRecord('incident');
incident.addQuery('parent', current.sys_id);
incident.query();
while(incident.next()){
incident.state = current.state;
incident.update();
}
Please Mark ✅ Correct/helpful, if applicable, Thanks!!
Regards
Sulabh Garg
Regards
Sulabh Garg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2022 11:27 PM
On Which Table have you written this BR on?
Can you put a log after line number 9 as below:
gs.info('value of State' + current.state);
Regards,
Shloke
Regards,
Shloke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2022 11:55 PM
Hi shloke,
This code working my in instance.
Early parent name different my instance (u_parent_incident).That's way getting error.
now works good
thank you for helping me
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2022 12:00 AM
I will leave it up to you to decide and mark the appropriate answer as correct, but I have given the working script first on this thread and the issue was with a custom field being used which is difficult for anyone in community to know what is customized at your end.
Regards,
Shloke
Regards,
Shloke

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2022 12:09 AM
Thanks Siva for marking my response as correct, It will help us in closing the thread and others can be benefitted.
Regards
Sulabh Garg