Changing the auto-populated value of HR Case Short Description

shegde
Giga Contributor

Maybe I'm missing something simple in terms of configuration, but how can I change the auto-populated value of the Case Short Description? Right now it's filling in the format "<Service name> Case For <Opened For user>".

How/where is this value set? I can't find it in the Business Rules, so am I correct in assuming that this is in the script includes?

1 ACCEPTED SOLUTION

Correct. The script include is named hr_ServicesUtil, and it's calling the function: createCaseFromProducer



You can replace that line with what you need, like the example your provided or if you have a lot of record producers, you can create a new script includes that will generate it for you, like what comes out of the box.


View solution in original post

11 REPLIES 11

eric_hemmer
ServiceNow Employee
ServiceNow Employee

Note that the suggested knowledge articles for the HR agent and employee that appear in the tabs in the middle of the HR Case form are driven off the content in the short description field by default.   However, you can change the field that drives the knowledge search.   I would recommend you created a custom field and configure the search results to drive off of that.   Therefore, you do not have to overwrite the short description to alter the knowledge results.  


Don Dom
Tera Contributor

Hello @shegde could you please paste the code you did for this function? 🙂 

Hello Michael,

I'm neophyte to serviceNow. Can you please help me which line of code needs to be changed in order to change the auto-population of short description.

cecil m
ServiceNow Employee
ServiceNow Employee

Check out the script include "hr_CaseUtils"

There's a line there that says

this._case.short_description = gs.getMessage("{0} case for {1}", [ serviceName, this._grProfile.user.name ]);

Hello

I'm not sure now, which line is responsible for creating Short Description of the case?

I do not see this in the code.

DonDom_4-1701789170492.png

 

 

DonDom_1-1701788984146.png

 

I would like to remove current name/surname and put there for example subject person:

 

 

DonDom_3-1701789096103.png

Please advise.