Comments on: Adding a Redirect and Info Message to a Record Producer https://servicenowguru.com/scripting/adding-redirect-message-record-producer/ ServiceNow Consulting Scripting Administration Development Tue, 28 May 2024 21:29:30 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: AKL https://servicenowguru.com/scripting/adding-redirect-message-record-producer/#comment-6821 Tue, 18 Oct 2016 06:03:42 +0000 https://servicenowguru.wpengine.com/?p=1252#comment-6821 In reply to AKL.

Regarding the current.number value, it will not work if “Assign a task number only upon insert (prevents unused numbers).” property is enabled.

]]>
By: AKL https://servicenowguru.com/scripting/adding-redirect-message-record-producer/#comment-6820 Tue, 18 Oct 2016 05:50:42 +0000 https://servicenowguru.wpengine.com/?p=1252#comment-6820 I found out that Info message doesn’t appear in chrome which is a known issue and will not be resolved.
https://hi.service-now.com/kb_view.do?sysparm_article=KB0565270

Another thing is that current.number doesn’t contain anything. I am unable to get the reference of created record in current object. So the message that is added in Firefox is like this-
“An incident has been opened for you.
The IT department will contact you for further information if necessary.”

An IFrame with buster set to true will continue to expand the Firefox scroll bar (FF v49.01). If not, the the info message appears but the record producer shown is erroneous.

]]>
By: Mark Stanger https://servicenowguru.com/scripting/adding-redirect-message-record-producer/#comment-6819 Thu, 01 Mar 2012 12:34:25 +0000 https://servicenowguru.wpengine.com/?p=1252#comment-6819 In reply to Ram Prakash Kutva Ramdoss.

I’ve never had an issue with this in Firefox so I’m not sure why it wouldn’t be working for you. If you can set it up and reproduce it in the ServiceNow demo instance I can take a look.

]]>
By: Ram Prakash Kutva Ramdoss https://servicenowguru.com/scripting/adding-redirect-message-record-producer/#comment-6818 Thu, 01 Mar 2012 07:15:10 +0000 https://servicenowguru.wpengine.com/?p=1252#comment-6818 I have tried the script. Its working fine in IE & Google Chrome,but not in Mozilla Firefox. Why is it so?

]]>
By: Mark Stanger https://servicenowguru.com/scripting/adding-redirect-message-record-producer/#comment-6817 Tue, 01 Nov 2011 20:25:32 +0000 https://servicenowguru.wpengine.com/?p=1252#comment-6817 In reply to Michele.

Hey Michele,

I’ve seen this done before. What you would need to do is use ‘current.setAbortAction(“true”)’ in your producer to abort the producer insert. Then your update would need to be a GlideRecord query and update.

]]>
By: Michele https://servicenowguru.com/scripting/adding-redirect-message-record-producer/#comment-6816 Tue, 01 Nov 2011 19:56:49 +0000 https://servicenowguru.wpengine.com/?p=1252#comment-6816 Anyone know how force a record producer to update an existing record instead of inserting a new one? Is there an abort command you can put in the record producer script?

]]>
By: Mark Stanger https://servicenowguru.com/scripting/adding-redirect-message-record-producer/#comment-6815 Tue, 05 Jul 2011 17:30:55 +0000 https://servicenowguru.wpengine.com/?p=1252#comment-6815 In reply to Rose.

The CMS is different because of the way it handles frames. In order to get the redirect to work in the CMS interface you have to set up a new page for your site that contains a dynamic content block with javascript to redirect the user to the correct place. Then you just use ‘producer.redirect’ to redirect to your new page, which contains the code to redirect outside of the inner frame. The dynamic content block on your new page will need to contain code like this to redirect and break out of the inner frame.

<script>top.location = 'home.do';</script>
]]>
By: Rose https://servicenowguru.com/scripting/adding-redirect-message-record-producer/#comment-6814 Tue, 05 Jul 2011 15:59:55 +0000 https://servicenowguru.wpengine.com/?p=1252#comment-6814 I tried this redirect on our CMS page but it takes me to the home page within the iFrame… the header is included in the iFrame. How can I get it to redirect back to the homepage outside of the iFrame?

producer.redirect = ‘home.do?sysparm_view=ess’;

]]>