Record Producer Script

supriyabehe
Tera Contributor

I want  to see Candidate Name in the Short Description of the HR Case created.

Now the script contains in record producer : 

new sn_hr_core.hr_ServicesUtil(current, gs).createCaseFromProducer(producer, cat_item.sys_id);
Now in hr case it is coming : abc for "subject person name". In place of subject person i want to pull candidate name which is coming from record producer field.
How can i achieve this?
1 ACCEPTED SOLUTION

@supriyabehe 

Did you get a chance to check my above response?

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

View solution in original post

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@supriyabehe 

Rather than touching the OOTB record producer script or the script include function

you can use after insert BR on your HR case table and do string manipulation and update the candidate name instead of subject person name. ensure you use current.setWorkflow(false) before update.

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

Chaitanya ILCR
Kilo Patron

Hi @supriyabehe ,

 

if you want to change this for any specific record producer 

you add below line   by replacing "your_variable_name" with your actual candidate variable name

if it is a reference variable use else remove .getDisplyaValue()

new sn_hr_core.hr_ServicesUtil(current, gs).createCaseFromProducer(producer, cat_item.sys_id);
current.short_description = producer.your_variable_name.getDisplayValue()

ChaitanyaILCR_0-1757078167284.png

 

 

if it's for all the record producer have BR in place or update the script include according to your needs 

 

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

 

Its a single line text variable

@supriyabehe 

Did you get a chance to check my above response?

If my response helped please mark it correct and close the thread so that it benefits future readers.

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