How to change ER case subject person
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2025 05:51 PM
I have tried for far too long to change the subject person after submitting an ER case. I've looked in business rules, client scripts, script includes, field configurations, and ticket header configurations (person row [didn't change any of the headers]). I've tried to look at the widget but I'm awful with code so chatgpt led me down a rabbit hole trying to find data.subject_person which isn't there.
Secondly, I have a multi-row variable set with the subject person in it. I'd like to link that person to the subject person field on the case record. I've tried to create a field on the RP that I was going to hide but created it to link it to the case record. I've tried business rules and 2000 different scripts. Nothing is working. Even if I manually input someone in the RP's subject person field (which is mapped), they still don't populate. I have to manually go into the case record and change the person there for it to work.
Thanks ahead of time. I've grown a couple grey hairs off this one lol
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2025 07:03 PM
subject person on case is usually the person who opened it.
Please create after insert business rule on your ER Case table
1) get the MRVS json value
2) parse it and set
Something like this
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
var mrvs = current.variables.mrvsVariableSetName;
var parsedData = JSON.parse(mrvs);
var employee = parsedData[0].employeeVariable; // I assume this variable is reference to sys_user
current.subject_person = employee;
current.setWorkflow(false);
current.update();
// if the variable within MRVS is string then you need to query sys_user and get the sysId and then set the subject person
})(current, previous);
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2025 12:03 PM
Hmmm. Common sense tells me the subject person is who the case is about, not who submitted it. Why would I want to see opened for and subject person if they're going to be the same person? That is why I'm trying to change that so the subject person is the actual person the allegation is against.
I used this business rule on the sn_hr_er_case table and it's still not working: