Put "Subject Person" in OOTB HRSD in the title for few specific HR cases?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2023 02:43 AM
Hello
Is there a way to put "subject person" for specific 4-5 HR Services instead of "opened for" ?
Please advise where I have to dig 🙂 thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2023 03:23 AM
Hi @Don Dom
The primary field Value will be shown in the record header.
Open a record and click 'form header' and check the 'primary field'
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2023 04:02 AM - edited 12-21-2023 04:14 AM
Oh nice, but can I build a "short description" from different field + opened by + subject person + text ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2023 06:54 AM
Hey there! You could use a business rule to replace the OOTB value that populates. You could also add script to the record producer itself in the script section to set this value on submit. Something like the below would work if you insert your own fields. In the example below, u_request_type is a field the end user completes when they submit the record producer. So the short description is "401k Inquiry for Jane Doe" instead of the OOTB one. Hope this helps!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2023 02:08 PM
The HR Case's Short Description will default differently based on how it's created.
- OOB, if created from record producer that is using the script of new sn_hr_core.hr_ServicesUtil(current, gs).createCaseFromProducer(producer, cat_item.sys_id);, will result in the HR Case’s Short Description being “<HR Service Name> case for <Opened For user>” .
- If created manually from the agent, it will default to whatever you have on the HR Service's template
- If created from email (i.e., inbound action), normally it is set from the email's Subject Line, but you can confirm those.
To prevent updating the OOB script include that defaults to the Opened For, I usually recommend creating a business rule on the HR Case table with appropriate conditions. Be sure to think of all the scenarios of cases being created (e.g., only want for specific HR Services, exclude cases with Source=Email) though. Do it as a before Insert with script similar to:
(function executeRule(current, previous /*null when async*/) {
current.short_description = current.hr_service.getDisplayValue() + " case for " + current.subject_person.getDisplayValue();
})(current, previous);