- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sunday
How to populate parent incident creation date on 'detection field' in the incident form in the servicenow
I have tried below script on Business Rule but did not works for me. Please suggest achieve on this requirement.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sunday
Hi @ashok17
Try with getReference() method so that you can dot walk.
function onLoad() {
if (g_form.getValue('parent'))
{
var parent = g_form.getReference('parent', function(parent) {
g_form.setValue('u_detection_time', parent.sys_created_on);
});
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sunday
Hi @ashok17
Please go through the below screenshot . I have also given the code below for the reference
Code:-
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sunday
Hi @namanajain ,
Thanks for response and i tried below script on Business Rules and it's work for me:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sunday
Hi @ashok17
Try with getReference() method so that you can dot walk.
function onLoad() {
if (g_form.getValue('parent'))
{
var parent = g_form.getReference('parent', function(parent) {
g_form.setValue('u_detection_time', parent.sys_created_on);
});
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sunday
Hi @Tanushree Maiti ,
Thanks for response, I have tried below script on Business Rule and it's works.
