HR case template fields not defaulting

Dennis Ford
Giga Guru

I am trying to set a default case state for an HR Service by using the HR Case template.  In my personal developer's instance, I modified the General Inquiry HR case template and added the State field with value of "Work in Progress".  I also added the Source(contact_type) field to the template with a value of "In Person".  If I create the case from the platform, the values default as I have specified.  However, if I create the case from the employee service center, then the values do not default.  I assume that the record producer must be defaulting the State and Source(contact_type) fields, and the record producer is overriding the HR case template.  Is that the expected behavior or is there some way around that?  Thanks!     

1 ACCEPTED SOLUTION

michaelj_sherid
ServiceNow Employee
ServiceNow Employee

Hi Dennis,

The hr_serviceUtil script include is setting those values from the function CreateCaseFromProducer. This is why you are getting different values when submitting from the ESC in regards to using the Create New Case in the fulfiller view. I believe around line 56 it is setting the source (contact_type) to self_service.

Regards,

Mike

 

View solution in original post

11 REPLIES 11

michaelj_sherid
ServiceNow Employee
ServiceNow Employee

Hi Dennis,

The hr_serviceUtil script include is setting those values from the function CreateCaseFromProducer. This is why you are getting different values when submitting from the ESC in regards to using the Create New Case in the fulfiller view. I believe around line 56 it is setting the source (contact_type) to self_service.

Regards,

Mike

 

I ran into this issue as well. I added a row into the Record Producer script (current.state=3;) and this worked for me.

Dennis Ford
Giga Guru

Hi Mike,

I'm assuming there is no way around this other than customizing the script?

Is the case template setting the fields first and then the CreateCaseFromProducer script overwriting them?  If the field is one which is not set by the CreateCaseFromProducer script, then could the case template be used to set a default for that field?

TIA

-Dennis

   

Hi Dennis,

You can set the State by way of a RP variable (Work In Progress set value to 2 in the variable as an example). This will work for the State, but even if you try to set the source, the script include will take precedence. If I may, why are you setting the source to - 'In Person' if submitted from a catalog item?

Regards,

Mike