---
sourceDocument: Xanadu API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# hr_ActivityUtils - Scoped

# hr_ActivityUtils - Scoped {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

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.

## hr_ActivityUtils - createCaseFromProducer(GlideRecord current, Object producer, String
cat_item.sys_id) {#ariaid-title2}

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
{#hrAU-createCaseFromProducer_GR_O_S__ul_jhc_rj2_h3b}
{#hrAU-createCaseFromProducer_GR_O_S__table_g1s_wl2_vhb__entry__3}

| 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. |
[Table 1. Parameters]

{#hrAU-createCaseFromProducer_GR_O_S__table_g1s_wl2_vhb} {#hrAU-createCaseFromProducer_GR_O_S__table_h1s_wl2_vhb__entry__2}

| Type | Description |
|-|-|
| Object | New case in related table, varies by product. |
[Table 2. Returns]

{#hrAU-createCaseFromProducer_GR_O_S__table_h1s_wl2_vhb}  
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);


