'Assignment group' and 'Assigned to' reset back to the initial value with the case closure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 02:11 AM
When the status is closed on the case, the "Assignment Group" and "Assigned to" fields value should reset to the initial value. These fields can have many different values in them while the case is ongoing and dozens of options you can choose to value for them. The BR script I'm trying to solve it, but it still doesn't seem to solve the it.
// Check if the state is changing to "Closed"
if (current.state == '6' && previous.state != '6') {
// Retrieve the initial values
var initialAssignmentGroup = current.assignment_group.getInitialValue();
var initialAssignedTo = current.assigned_to.getInitialValue();
// Reset the assignment group and assigned to to their initial values
current.assignment_group = initialAssignmentGroup;
current.assigned_to = initialAssignedTo;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 02:44 AM
Hi @ElvinSalim,
You can create 2 custom field (hide it ) and store the assignment group and assigned to values ( create a BR for insert and in this u can fetch both values and store it ) and in your BR while closing the record you can fetch the values from these custom field and set it back to initial values.
Hope this solves your question. if it does, please mark my response helpful and solution accepted.
Thank you
Swathi Sarang