hr\_ActivityUtils - Scoped
concept australia Updated Sep 10, 2026 1 min read hr_ActivityUtilsAPI.md
The hrActivityUtils script include enables you to create HR cases from a record producer.
This script include requires the HR Lifecycle Events plugin (com.sn_hr_lifecycle_events) and runs in the sn_hr_le namespace.
Parent Topic:Server API reference
hr_ActivityUtils - createCaseFromProducer(GlideRecord current, Object producer, String cat_item.sys_id)
Creates a case from a record producer and service. This method is intended to be called as-is to create a producer and does not require supplying data.
The following variables can be configured in a record producer to provide additional capabilities as follows:
job– References sn_hr_core_job and maps to subject_person_job in an HR caseopened_for– References sys_user and maps opened_for in an HR caseconcurrent_job– If the record producer includes this variable (by activating checkbox) and parameters have job information, creates a new job in sn_hr_core_job table
| Name | Type | Description |
|---|---|---|
| current | GlideRecord | GlideRecord for case to be created. |
| producer | Object | Comma-separated key value pair containing data as questions and answers that are automatically provided when a user submits an answer to a record producer question. |
| cat_item.sys_id | String | Looks up the HR service of case being created and variable names to populate the description. |
| Type | Description |
|---|---|
| Object | New case in related table, varies by product. |
This method is intended to be called as-is to create a producer and does not require supplying data.
JavaScript
new sn_hr_core.hr_ActivityUtils(current).createCaseFromProducer(producer, cat_item.sys_id);49 lines · 2.5 KB
--- title: hr\_ActivityUtils - Scoped description: The hrActivityUtils script include enables you to create HR cases from a record producer.Creates a case from a record producer and service. This method is intended to be called as-is to create a producer and does not require supplying data. locale: en-US canonical_url: https://www.servicenow.com/docs/r/australia/api-reference/server-api-reference/hr\_ActivityUtilsAPI.html release: australia product: Server API Reference classification: server-api-reference topic_type: concept last_updated: "2026-09-10" reading_time_minutes: 1 breadcrumb: [Server API reference, API reference, API implementation and reference] --- # hr\_ActivityUtils- Scoped The hrActivityUtils script include enables you to create HR cases from a record producer. This script include requires the HR Lifecycle Events plugin \(com.sn\_hr\_lifecycle\_events\) and runs in the `sn_hr_le` namespace. **Parent Topic:**[Server API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/api-server.md) ## hr\_ActivityUtils - createCaseFromProducer\(GlideRecord current, Object producer, String cat\_item.sys\_id\) Creates a case from a record producer and service. This method is intended to be called as-is to create a producer and does not require supplying data. The following variables can be configured in a record producer to provide additional capabilities as follows: - `job` – References sn\_hr\_core\_job and maps to subject\_person\_job in an HR case - `opened_for` – References sys\_user and maps opened\_for in an HR case - `concurrent_job` – If the record producer includes this variable \(by activating checkbox\) and parameters have job information, creates a new job in sn\_hr\_core\_job table |Name|Type|Description| |----|----|-----------| |current|GlideRecord|GlideRecord for case to be created.| |producer|Object|Comma-separated key value pair containing data as questions and answers that are automatically provided when a user submits an answer to a record producer question.| |cat\_item.sys\_id|String|Looks up the HR service of case being created and variable names to populate the description.| |Type|Description| |----|-----------| |Object|New case in related table, varies by product.| This method is intended to be called as-is to create a producer and does not require supplying data. ``` new sn_hr_core.hr_ActivityUtils(current).createCaseFromProducer(producer, cat_item.sys_id); ```
| title | hr\_ActivityUtils - Scoped |
| description | The hrActivityUtils script include enables you to create HR cases from a record producer.Creates a case from a record producer and service. This method is intended to be called as-is to create a producer and does not require supplying data. |
| locale | en-US |
| canonical_url | https://www.servicenow.com/docs/r/australia/api-reference/server-api-reference/hr\_ActivityUtilsAPI.html |
| release | australia |
| product | Server API Reference |
| classification | server-api-reference |
| topic_type | concept |
| last_updated | 2026-09-10 |
| reading_time_minutes | 1 |
| breadcrumb | Server API referenceAPI referenceAPI implementation and reference |