- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-21-2016 08:57 AM
Salut,
I have a incident record producer and I would like to know (from the script section) how can I read the Fulfillment group catalog item field and populate the Assignment group of the incident.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-21-2016 09:47 AM
Are you referring the fulfilment group on item definition ? If yes, the below script will work
var map = gs.action.getGlideURI().getMap();
if (map.get('sysparm_action') == 'execute_producer' && map.get('sysparm_id') ) {
var getRecordProducerData = new GlideRecord('sc_cat_item_producer');
if(getRecordProducerData.get(map.get('sysparm_id')))
{
current.assignment_group=getRecordProducerData.group;
}
}
I haven't tried it on Service portal yet. I had written this for one of the threads and got the comment that it doesn't work for service portal.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-21-2016 09:06 AM
Hi Marc,
I haven't done this yet, but have you tried using the script to do something like:
current.assignment_group = producer.fulfiller_group;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-21-2016 09:47 AM
Are you referring the fulfilment group on item definition ? If yes, the below script will work
var map = gs.action.getGlideURI().getMap();
if (map.get('sysparm_action') == 'execute_producer' && map.get('sysparm_id') ) {
var getRecordProducerData = new GlideRecord('sc_cat_item_producer');
if(getRecordProducerData.get(map.get('sysparm_id')))
{
current.assignment_group=getRecordProducerData.group;
}
}
I haven't tried it on Service portal yet. I had written this for one of the threads and got the comment that it doesn't work for service portal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-21-2016 10:01 AM
Thks Kalai,
That did the trick, the way I was doing it always came has undefined.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2023 07:59 AM
This worked from the "Try It" on the record producer but not from within Service Portal. Any ideas on how to access the fulfillment group of the record producer when submitting through service portal?