- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-14-2015 10:46 AM
Hello All,
How to find out if a change record was created using a record producer? I want to make sure that an existing business rule on the change request table does not fire when the change is created using a particular service calalog item (which is a record producer).
Thank you
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-14-2015 11:48 AM
Found the answer and want to share it with everyone as its a very useful script.
Solution & the script is available on servicenow guru...check the below URL. I reused the same script but am not saving the record producer (RP) name on the resultant record but just checking it on the fly via a business rule. The beauty is that the RP sys ID is available only during the create action hence I was able to skip the abort action if the record is created using this RP and the record is successfully created. BR still performs the check during update action forces the user to provide the values which are not available via RP else aborts...
//Pull the record producer ID off of the URL map and set it on the task
var map = gs.action.getGlideURI().getMap();
if(map.get('sysparm_action') == 'execute_producer' && map.get('sysparm_id')){
current.u_record_producer = map.get('sysparm_id');
}
Identify which ServiceNow Record Producer was used to create a record - ServiceNow Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-14-2015 11:48 AM
Found the answer and want to share it with everyone as its a very useful script.
Solution & the script is available on servicenow guru...check the below URL. I reused the same script but am not saving the record producer (RP) name on the resultant record but just checking it on the fly via a business rule. The beauty is that the RP sys ID is available only during the create action hence I was able to skip the abort action if the record is created using this RP and the record is successfully created. BR still performs the check during update action forces the user to provide the values which are not available via RP else aborts...
//Pull the record producer ID off of the URL map and set it on the task
var map = gs.action.getGlideURI().getMap();
if(map.get('sysparm_action') == 'execute_producer' && map.get('sysparm_id')){
current.u_record_producer = map.get('sysparm_id');
}
Identify which ServiceNow Record Producer was used to create a record - ServiceNow Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2018 08:47 AM
How is it that you have your BR set up Bharat? I have tried to set up the BR on the ServiceNow Guru site and it doesn't appear to be working for me.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-14-2015 11:48 AM
Hi Bharat,
If you variable editor then you should be able to identify if this came through record producer or not.
Otherwise I think you can create a custom checkbox and mark it to true if the record is created through record producer or not. You can hide this checkbox from the form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-14-2018 05:27 PM
This table has a mapping of record producers & records generated via them:
sc_item_produced_record
https://<instance-name>.service-now.com/sc_item_produced_record_list.do