How to create an HR Case with custom variables in back-end

rafas_2703
Tera Guru

Hi everyone,

 

I have a request to add a custom variable on back-end when creating an HR Case. The thing is, I don't want to create a new entry on the table for this, I want to find a way to make this achievable maybe by a record producer and a flow.. I don't know if it's possible and that's why I am here to ask for opinions 🙂

 

Any ideias?

Thank you!

2 REPLIES 2

HrishabhKumar
Kilo Sage

Hi @rafas_2703 ,

Adding a custom variable to an HR Case in ServiceNow without creating a new entry in the table can be achieved using a combination of a record producer and a flow or workflow. I've provided a high level steps below:

Step 1: Create a Record Producer

Navigate to Service Catalog > Catalog Definitions > Record Producers.

Create a New Record Producer for the HR Case table (sn_hr_core_case).

Add Variables to the Record Producer for the custom data.

 

Step 2: Create a Flow in Flow Designer

Navigate to Flow Designer and create a new flow.

Set Trigger: Record Created for the Requested Item [sc_req_item] table.

Add Actions:

  • Look Up Record: Retrieve sc_item_option_mtom records based on Request Item = Trigger > Requested Item Sys ID.
  • Update Record: Update the HR Case with custom variable values from the Look Up Record action.

 

Thanks,

Hope this helps.

If my response proves helpful please mark it helpful and accept it as solution to close this thread.

Hi @HrishabhKumar ,

 

I want the flow and maybe business rule to show the field on the HR Case form without creating an entry on sn_hr_core_case table, like a variable on the fulfillment instructions.

 

Can it be done?

Thank you!