- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2025 09:24 AM
Hi Team,
Please help, "How to create the business rule on the problem table for the automatic creation of problem_task when the state is in assess and after saving the problem task has to create.
Thank You
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2025 09:32 AM
Hi @pnarendra12 ,
create an after insert update BR
with script
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
var task = new GlideRecord('problem_task');
task.initialize();
task.problem = current.getValue('sys_id');
task.short_description = 'add your task short description'; //
task.description = 'add description';
//add you fields and set values if needed
task.insert();
})(current, previous);
you can also go with Flow designer too
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2025 09:34 AM
Hello @pnarendra12
Try the solution below:
- BR configuration:
- Script
(function executeRule(current, previous /*null when async*/ ) {
var task = new GlideRecord('problem_task');
task.initialize();
task.problem_id = current.sys_id;
task.short_description = 'Initial assessment required';
task.description = 'Auto-generated task as problem entered Assess state.';
task.assigned_to = current.assigned_to; // Optional: assign to same user
task.insert();
})(current, previous);
The above business rule will trigger when the state changes to access and create a new problem task record.
Hope this helps!
"If you found my answer helpful, please like and mark it as an "accepted solution". It helps future readers to locate the solution easily and supports the community!"
Thank You
Juhi Poddar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2025 09:32 AM
Hi @pnarendra12 ,
create an after insert update BR
with script
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
var task = new GlideRecord('problem_task');
task.initialize();
task.problem = current.getValue('sys_id');
task.short_description = 'add your task short description'; //
task.description = 'add description';
//add you fields and set values if needed
task.insert();
})(current, previous);
you can also go with Flow designer too
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2025 09:34 AM
Hello @pnarendra12
Try the solution below:
- BR configuration:
- Script
(function executeRule(current, previous /*null when async*/ ) {
var task = new GlideRecord('problem_task');
task.initialize();
task.problem_id = current.sys_id;
task.short_description = 'Initial assessment required';
task.description = 'Auto-generated task as problem entered Assess state.';
task.assigned_to = current.assigned_to; // Optional: assign to same user
task.insert();
})(current, previous);
The above business rule will trigger when the state changes to access and create a new problem task record.
Hope this helps!
"If you found my answer helpful, please like and mark it as an "accepted solution". It helps future readers to locate the solution easily and supports the community!"
Thank You
Juhi Poddar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2025 09:48 AM
what did you start with?
It's an easy requirement.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader