- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2016 10:00 PM
HI Aric, in this case it was to populate the the record itself before the submission. it does not seem feasible to achieve so, so my colleague has to achieve the goal with another approach. Thanks for your reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2016 09:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2021 03:15 PM - edited 02-02-2025 03:46 PM
We can use the RP (render properties) API with the getParameterValue() method to get the sys_id of the current record producer like so. You can use this in the producer's script:
current.u_record_producer = RP.getParameterValue('sysparm_id');
This is the approach recommended by the ServiceNow documentation in the article Populate record producer data and redirect users.
You can however also use cat_item instead (yes, this works in a record producer), which is what ServiceNow use in some of their OOTB scripts, such as in their HRSD app. This has the advantage of being able to access other properties, such as the name of the record producer (via: cat_item.name):
current.u_record_producer = cat_item.sys_id;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2021 02:59 AM
This did work, thank you so much!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2021 03:53 AM
Hi George
I'm not quite sure what you want.
Maybe this on the client side?
g_form.getUniqueValue()
Regards