- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2025 07:02 AM
I have a requirement where the Source field of the HR case should get auto-populated based on how it's getting created. For ex- if the case is being raised over voicemail then the source should auto-populate as phone. How can this be achieved?
Thanks!!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2025 02:42 AM
It's not possible to auto populate when somebody calls the helpdesk number or sends voicemail.
It's possible when we know the source of record
In case of call or voicemail the agent will be setting the HR case form fields, so it's responsibility on that agent.
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
01-24-2025 07:19 AM
@Vaishali 11 You need to populate the source in the script which is responsible to create the case when the case was raised via voicemail.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2025 02:02 AM
Hi @Sandeep Rajput could you please tell which script you are referring to?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2025 12:12 PM
Hello @Vaishali 11
If you need to populate the Source field when creating the HR case via a script (e.g., in the script responsible for case creation), you can directly set the value of the Source field in that script based on how the case was raised.
Example script:
var hrCase = new GlideRecord('sn_hr_core_case'); // Create a new HR case record
hrCase.initialize(); // Initialize the record
// Assuming you know the case creation method, e.g., 'Voicemail'
var caseCreationMethod = 'Voicemail'; // This value can be dynamically set
// Set the source field based on the case creation method
if (caseCreationMethod == 'Voicemail') {
hrCase.setValue('source', 'phone'); // Set the Source field to 'phone' for voicemail
} else if (caseCreationMethod == 'Email') {
hrCase.setValue('source', 'email'); // Set the Source to 'email' for email
} else {
hrCase.setValue('source', 'other'); // Default to 'other' if the creation method is unknown
}
// Populate other necessary fields
// Insert the record into the table
hrCase.insert();
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2025 02:04 AM
Hi @Juhi Poddar could you please explain to which script you mean to add this and also how can we do the identification if the case is coming from voicemail?