Default HR Case Short Description and Source fields

charitha ts
Tera Contributor

How to this in HR case Creation

When an HR case is created, the Short Description should default to 'HR Service' + 'Subject person'

Additionally, when an HR Case is created from the Create New Case module, set the Source to Phone.

 

Thanks in Advance.

1 ACCEPTED SOLUTION

@charitha ts 

Thank you for marking my response as helpful.

If my response helped you please mark it correct to close the question so that it benefits future readers as well.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

5 REPLIES 5

Susan Britt
Mega Sage
Mega Sage

The Short Description on the HR Case created from a record producer is set by the hr_CaseUtils Script Include (_setComonFields function).  You can customize this to use Subject person instead of Opened for; or to avoid the customization you could create a Business Rule to always set the Short Description on cases to be the same.  If you go the BR route, consider the source type of Email and Transfers - do you really want to update the Short Description on those?

 

In regards to defaulting the source, there are a couple of options, but the easiest may be to set the default value of the contact_type field for the HR Case table to be phone.  When the case is created from portal/ESC, it will default to Self-Service, your Inbound Actions should set any cases created from email to the correct value, etc.  This would have the default for cases created from the platform.

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you can use before insert BR on HR Case table to set the short description like this

current.short_description = current.hr_service.getDisplayValue() + ' ' + current.subject_person.getDisplayValue();

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@charitha ts 

Thank you for marking my response as helpful.

If my response helped you please mark it correct to close the question so that it benefits future readers as well.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader