- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2020 03:47 AM
I want to Map Record Producer variables with the HR case form fields for a particular HR service.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2020 04:09 AM
Hi Tapish,
There are multiple ways to map that
1) Using the Map to Field on Variable
- When you will make a variable in record producer(no tin a variable set),there you will see an Checkbox names "Map to field".
- Tick this checkbox and then you will get an "field" in this you can select field of target table to map record producer's variable to target table's field.
2) Using record producer script
Ex: current.field_name_of_target_table = producer.variable_name;
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2020 04:48 AM
There are OOB scripts updating the State on HR Cases. If you go to your created HR Case, when the record producer is submitted, look at the History to see if the State is ever getting updated with your mapped value. The State could be getting overridden by the Template or Script Include.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2020 05:01 AM
The Script Include being hr_ServicesUtil called from the Record Producer's Script.
new sn_hr_core.hr_ServicesUtil(current, gs).createCaseFromProducer(producer, cat_item.sys_id);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2020 05:10 AM
so should i disable the OOB script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2020 05:52 AM
Hi,
please comment that line from record producer script or remove it from that place
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2020 04:09 AM
Hi Tapish,
There are multiple ways to map that
1) Using the Map to Field on Variable
- When you will make a variable in record producer(no tin a variable set),there you will see an Checkbox names "Map to field".
- Tick this checkbox and then you will get an "field" in this you can select field of target table to map record producer's variable to target table's field.
2) Using record producer script
Ex: current.field_name_of_target_table = producer.variable_name;
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader