Record producer sys_id

Petr Pastuszek1
Tera Contributor

Hello,

does anyone know how to access sys_id of current record producer in the producer script?

/Petr

 

PetrPastuszek1_0-1713526897894.png

 

3 REPLIES 3

Maddysunil
Kilo Sage

@Petr Pastuszek1 

Please see if below link can help you

https://www.servicenow.com/community/developer-forum/get-sys-id-before-creating-record-producer/m-p/... 

 

Please Mark Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.

Mark Roethof
Tera Patron
Tera Patron

Hi there,

 

I have never tried RP.getParameterValue('sysparm_id'), so can't comment on that.

 

Just thinking out loud if that does not work.

current.sys_id would give you the sys_id of the newly created record. So can't use that. I don't know if there is a shortcut for your case, though there is at least a table where is stored which record producer has resulted in which record. So you might query that table? Using current.sys_id.

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Petr Pastuszek1
Tera Contributor

Solved!

Solution is to call -->  cat_item.sys_id

 

before I tried producer.cat_item.sys_id or current.cat_item.sys_id but solution is just cat_item.sys_id