Comments on: Identify which ServiceNow Record Producer was used to create a record https://servicenowguru.com/reporting/identify-servicenow-record-producer-create-record/ ServiceNow Consulting Scripting Administration Development Tue, 28 May 2024 19:20:46 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Matthew https://servicenowguru.com/reporting/identify-servicenow-record-producer-create-record/#comment-9731 Tue, 30 Jan 2018 23:03:47 +0000 https://servicenowguru.wpengine.com/?p=5518#comment-9731 In reply to James Fricker.

Thank you!!

]]>
By: Scott Hetzel https://servicenowguru.com/reporting/identify-servicenow-record-producer-create-record/#comment-9730 Wed, 13 Sep 2017 21:22:27 +0000 https://servicenowguru.wpengine.com/?p=5518#comment-9730 Thanks James! .. your suggestion worked perfectly!

]]>
By: James Fricker https://servicenowguru.com/reporting/identify-servicenow-record-producer-create-record/#comment-9729 Tue, 05 Sep 2017 05:35:26 +0000 https://servicenowguru.wpengine.com/?p=5518#comment-9729 I have found that the record producer GlideRecord is available as a global object in the producer script.
The object reference is “cat_item”.
So you can get the sys_id of the record producer very easily using cat_item.sys_id
So for example…

current.u_record_producer = cat_item.sys_id;

]]>
By: Mark Stanger https://servicenowguru.com/reporting/identify-servicenow-record-producer-create-record/#comment-9728 Wed, 22 Mar 2017 20:36:14 +0000 https://servicenowguru.wpengine.com/?p=5518#comment-9728 In reply to Masoom Sharma.

Thank you!

]]>
By: Masoom Sharma https://servicenowguru.com/reporting/identify-servicenow-record-producer-create-record/#comment-9727 Wed, 22 Mar 2017 20:05:33 +0000 https://servicenowguru.wpengine.com/?p=5518#comment-9727 Hey Mark,

I wanted to post an easy way to do it . We can use var rpID = RP.getParamaterValue(‘sysparm_id’); and use it in producer script to set it in target reference field created on incident/change or any target record.
It worked for me :)

Thanks,
Masoom Sharma

]]>
By: Mark Stanger https://servicenowguru.com/reporting/identify-servicenow-record-producer-create-record/#comment-9726 Tue, 04 Oct 2016 13:52:45 +0000 https://servicenowguru.wpengine.com/?p=5518#comment-9726 In reply to Anders Nilsen.

You’re right! Must be some limitation with the Service Portal API. Fortunately, I previously had a solution that worked just as well, and is compatible with service portal. I’ve updated the instructions above. You’ll need to remove the current business rule and add a new one to the Record producer table as described above. Then you’ll need to force an update to all of your record producer records that you want this to work with so that the customization will take effect.

]]>
By: Anders Nilsen https://servicenowguru.com/reporting/identify-servicenow-record-producer-create-record/#comment-9725 Tue, 04 Oct 2016 10:09:37 +0000 https://servicenowguru.wpengine.com/?p=5518#comment-9725 Hi!

It seems like this code doesn’t work on the new Service Portal? Anyone found a workaround for that?

]]>
By: Ina Therese https://servicenowguru.com/reporting/identify-servicenow-record-producer-create-record/#comment-9724 Fri, 27 May 2016 13:04:25 +0000 https://servicenowguru.wpengine.com/?p=5518#comment-9724 For a beginner like me, it was not obvious that I should have checked the “insert” on the business rule. Couldn’t get it to work at first, but it does now.

Thanks!

]]>
By: Mark Stanger https://servicenowguru.com/reporting/identify-servicenow-record-producer-create-record/#comment-9723 Tue, 15 Dec 2015 04:35:56 +0000 https://servicenowguru.wpengine.com/?p=5518#comment-9723 In reply to Bharat Awasthi.

I think it was just posted here. I don’t think it’s been documented anywhere and I haven’t seen any other use for it other than this.

]]>
By: Bharat Awasthi https://servicenowguru.com/reporting/identify-servicenow-record-producer-create-record/#comment-9722 Mon, 14 Dec 2015 19:58:27 +0000 https://servicenowguru.wpengine.com/?p=5518#comment-9722 Hi Mark,

Again a great solution. Just curious, where did you find “gs.action.getGlideURI().getMap()” this method documented on Wiki. I search the glide system class documentation but could not spot it??

Thanks

]]>