
- 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 11:22 PM
Hi,
what is not working?
what scripts have you written?
what debugging have you performed?
Did you enhance the script as per your requirement?
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:23 PM
Hey srinu
You can use before insert as following code:-
Apply on Incident table
var gr=new GlideRecord('u_incident_task');
gr.initialize();
gr.short_description=current.short_description;
gr.description=current.description;
gr.parent=current.sys_id;
gr.insert();