How to trigger record producer from the flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â02-18-2025 06:03 PM
I have a requirement to send task with a record producer form to be assigned to the leader so they can submit the form. How can we achieve this via flow designer?
Any insight would be much appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â02-18-2025 09:42 PM
Hi Shivam
If I understood your requirement clearly, you want to assign the task created within the record on submission of a record producer to the task's Assignment Group manager. If yes, please follow below example where I have a record producer to create an incident and corresponding incident task. The incident task is being assigned to Hardware group with the group manager being Abel Tuter. By using below Record producer script, you can achieve this. Please note that you need to have a Record Producer variable named 'short_description' for this to work. You can customize this script as per your requirement.
current.short_description = 'Create Incident';
current.caller_id = gs.getUserID();
var grIncTask = new GlideRecord('incident_task');
grIncTask.initialize();
grIncTask.incident = current.sys_id;
grIncTask.short_description = producer.short_description;
//Assuming that this task is assigned to Hardware team
grIncTask.assignment_group = '8a5055c9c61122780043563ef53438e3';
grIncTask.assigned_to = grIncTask.assignment_group.manager;
grIncTask.insert();
Output:
Thanks and Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.