The error: invalid property id (Process Automation.65fea5d993050210f7db35918bba1034.InlineScript_assignment_groupa1fea5d9f5050210d8e77cda73f14762; line 10)
The Code: // Get the incident category var category = current.category;
// Define a map to store category-to-group
var assignmentMap = {
"Hardware": "Hardware",
"Software": "Software",
"Network": "Network",
"Inquiry/Help": "Help Desk",
null: "Incident Management",
};
// Does the category exists in the map
var assignedGroup = assignmentMap[category];
// Assign the group to the incident if found
if (assignedGroup) {
current.assignment_group = assignedGroup;
} else {
gs.info ("no assignment for " +category);
}
// Update the incident record
current.update();
I am expecting that assignment groups get associated with categories at creation or update of records.