Help me on the Display BR need to perform the activity
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2025 09:55 PM
Hi,
Using Display BR that automatically populates the "Short Description" field of a Problem Task with the "Problem Statement" from the related Problem when the task is created. Additionally, ensure that the "Assignment Group" and "Assigned To" fields in the Problem Task are populated with the corresponding values from the Problem.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2025 11:02 PM - edited 01-25-2025 03:52 AM
Hello @kranthi2
In Advanced tab section under script field write code as below:
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
current.short_description = current.problem.short_description;
current.assignment_group = current.problem.assignment_group;
current.assigned_to = current.problem.assigned_to;
})(current, previous);
If my response has helped you hit helpful button and if your concern is solved do mark my response as correct.
Thanks & Regards
Viraj Hudlikar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2025 02:41 AM
It works, thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2025 08:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2025 03:47 AM
Hello @kranthi2
1. Create the Display Business Rule
- Table: Problem Task [problem_task]
- When: Display
- Condition: Problem is not empty
- Script: Populate the fields with values from the related Problem record.
Configuration setup
2. Script for the Display Business Rule
(function executeRule(current, previous /*null when async*/) {
// Check if the related Problem record exists
var grProblem = new GlideRecord('problem');
// Query the related Problem record
if (grProblem.get(current.problem)) {
// Set Short Description from Problem's Problem Statement
current.short_description = grProblem.problem_statement;
// Set Assignment Group and Assigned To from the Problem record
current.assignment_group = grProblem.assignment_group;
current.assigned_to = grProblem.assigned_to;
}
})(current, previous);
The above business rules check if the problem field is not empty and then trigger the BR and populate the fields in problem_task record with the corresponding values from the Problem.
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