{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":1142,"path":"api-reference/server-api-reference/hr_ActivityUtilsAPI.md","title":"hr\\_ActivityUtils - Scoped","bundle":null,"doc_type":null,"release":"australia","body":"\n# hr\\_ActivityUtils- Scoped\n\nThe hrActivityUtils script include enables you to create HR cases from a record producer.\n\nThis script include requires the HR Lifecycle Events plugin \\(com.sn\\_hr\\_lifecycle\\_events\\) and runs in the `sn_hr_le` namespace.\n\n**Parent Topic:**[Server API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/api-server.md)\n\n## hr\\_ActivityUtils - createCaseFromProducer\\(GlideRecord current, Object producer, String cat\\_item.sys\\_id\\)\n\nCreates 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.\n\nThe following variables can be configured in a record producer to provide additional capabilities as follows:\n\n-   `job` – References sn\\_hr\\_core\\_job and maps to subject\\_person\\_job in an HR case\n-   `opened_for` – References sys\\_user and maps opened\\_for in an HR case\n-   `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\n\n|Name|Type|Description|\n|----|----|-----------|\n|current|GlideRecord|GlideRecord for case to be created.|\n|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.|\n|cat\\_item.sys\\_id|String|Looks up the HR service of case being created and variable names to populate the description.|\n\n|Type|Description|\n|----|-----------|\n|Object|New case in related table, varies by product.|\n\nThis method is intended to be called as-is to create a producer and does not require supplying data.\n\n```\nnew sn_hr_core.hr_ActivityUtils(current).createCaseFromProducer(producer, cat_item.sys_id);\n```\n\n"}}