
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-18-2021 09:08 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-18-2021 10:43 PM
Hi,
approach using display BR + onLoad client script on incident_task
1) Create a Display Business Rule on your Incident Task Table and use the script mentioned below:
(function executeRule(current, previous /*null when async*/) {
// Add your code here
g_scratchpad.shortDescription = current.parent.short_description;
g_scratchpad.description = current.parent.description;
})(current, previous);
2) Write an On Load Client Script on Incident Task Table with below Code:
function onLoad() {
//Type appropriate comment here, and begin script below
g_form.setValue('short_description', g_scratchpad.shortDescription);
g_form.setValue('description', g_scratchpad.description);
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-18-2021 09:32 PM
Hi,
are you saying on incident form under incident task related list when you click new button the fields on incident_task should get auto-populated with data from parent incident?
if yes then you can use display BR on incident task and get the field values and set it
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-18-2021 10:39 PM
Yes
Can you please send me script
Sidhu !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-18-2021 10:43 PM
Hi,
approach using display BR + onLoad client script on incident_task
1) Create a Display Business Rule on your Incident Task Table and use the script mentioned below:
(function executeRule(current, previous /*null when async*/) {
// Add your code here
g_scratchpad.shortDescription = current.parent.short_description;
g_scratchpad.description = current.parent.description;
})(current, previous);
2) Write an On Load Client Script on Incident Task Table with below Code:
function onLoad() {
//Type appropriate comment here, and begin script below
g_form.setValue('short_description', g_scratchpad.shortDescription);
g_form.setValue('description', g_scratchpad.description);
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-18-2021 11:14 PM
Hi ankur
This code is not Working
Sidhu !