How to auto-populate incident field in incident_task table ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2023 10:46 AM
How to auto-populate incident number of incident table to incident field of incident_task table ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2023 07:42 AM
Use this Script in Business Rule
var task= new GlideAggregate('incident_task');
task.initialize();
task.parent = current.sys_id;
task.incident = current.sys_id;
task.insert();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2023 01:25 AM
Thanks for replying @Kishore Aregila
There may have been a miscommunication, let me clarify what I meant. My requirement was quite different I meant to say that once I click on "new" button in the related list of Incident form to create a new Incident Task then one of the field in Incident Task form named 'incident' must auto-populate its value with the parent Incident number. Like if Incident form has Incident number: INC00000101 then the incident task form must auto-populate this value in its incident field on load.
I had written a client-script for this and it worked for me.
Client Script:
Table: Incident Task
Type : onLoad