How to populate record producer field in incident table on creation of new items in table?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2024 04:03 AM
Hi
Currently when an incident is created, the name of the record producer only goes into the Record Producer field in the Incident table overnight via a Scheduled Script Execution.
I want to make that happen when the Incident is created, what would be the best way to do this?
Can the Scheduled Script be set to run when a new incident is created? There is also a script include that runs in the background.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2024 05:50 AM
Hi @Kiran_25 You can use Record Producer Script field to map a Record Producer field to Incident Field.
Regards,
Siddharam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2024 05:55 AM
Hi
This is the script currently:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2024 06:39 AM - edited 04-28-2024 06:40 AM
Hi @Kiran_25 ,
You can do a after insert business rule on incident table:
sc_item_produced_record table stores the names of record producer
var gr = new GlideRecord("sc_item_produced_record"); gr.addQuery("task", current.sys_id); gr.query(); if (gr.next()) { current.record_producer = gr.producer.sys_id;//your record producer variable name current.update(); }
Please mark my answer correct/helpful if it resolved your query