Comments on: ‘Copy’ UI action for Change requests https://servicenowguru.com/ui-actions-system-ui/copy-ui-action-change-requests/ ServiceNow Consulting Scripting Administration Development Wed, 06 Mar 2024 19:58:04 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Mark Stanger https://servicenowguru.com/ui-actions-system-ui/copy-ui-action-change-requests/#comment-5914 Wed, 03 Dec 2014 01:04:39 +0000 https://servicenowguru.wpengine.com/?p=342#comment-5914 In reply to Steve H.

Hi Steve, I’m not sure how you could deal with that. You’ll probably need to contact ServiceNow support to investigate.

]]>
By: Steve H https://servicenowguru.com/ui-actions-system-ui/copy-ui-action-change-requests/#comment-5913 Tue, 02 Dec 2014 16:29:10 +0000 https://servicenowguru.wpengine.com/?p=342#comment-5913 Mark,
This works great on smaller changes, but we have run into an issue where we bump up against the UI transaction quota limits when we have many CI’s associated with the change. In our test example, we had 365 related CI’s and only were able to copy about 340 before it timed out.
Any suggestions on how to avoid this?

]]>
By: KabirS https://servicenowguru.com/ui-actions-system-ui/copy-ui-action-change-requests/#comment-5912 Tue, 12 Aug 2014 14:57:53 +0000 https://servicenowguru.wpengine.com/?p=342#comment-5912 In reply to Mark Stanger.

Thanks Mark for the quick reply. I thought that would be the case as well and wondered if there was any other quick way of doing this. Will give this a try :)

]]>
By: Mark Stanger https://servicenowguru.com/ui-actions-system-ui/copy-ui-action-change-requests/#comment-5911 Tue, 12 Aug 2014 14:43:52 +0000 https://servicenowguru.wpengine.com/?p=342#comment-5911 In reply to KabirS.

This can certainly be done, you would need to perform a query against the ‘question_answer’ table using a similar routine to the one found in the sample script above and perform inserts of any records found.

]]>
By: KabirS https://servicenowguru.com/ui-actions-system-ui/copy-ui-action-change-requests/#comment-5910 Tue, 12 Aug 2014 13:08:23 +0000 https://servicenowguru.wpengine.com/?p=342#comment-5910 Any way to copy the varaible information as well if it was generated via a Record Producer. Currently variable information not copied over.

]]>
By: Masha https://servicenowguru.com/ui-actions-system-ui/copy-ui-action-change-requests/#comment-5909 Thu, 29 Aug 2013 23:15:24 +0000 https://servicenowguru.wpengine.com/?p=342#comment-5909 Thank you Mark for the helpful script!

Here are the corrections that I had to make for this script to work as intended:

– When setting the change_request on the new task, a sys_id of the task should be used:
==> newTask.change_request = newChange.sys_id;

– In the code for copying task attachments the second sys_id should be of the new task:
if (typeof GlideSysAttachment != ‘undefined’)
GlideSysAttachment.copy(‘change_task’, taskID, ‘change_task’, newTask.sys_id);//Calgary and up
else
Packages.com.glide.ui.SysAttachment.copy(‘change_task’, taskID, ‘change_task’, newTask.sys_id);//pre Calgary

Thank you again!

]]>
By: Mark Stanger https://servicenowguru.com/ui-actions-system-ui/copy-ui-action-change-requests/#comment-5908 Fri, 16 Aug 2013 17:05:43 +0000 https://servicenowguru.wpengine.com/?p=342#comment-5908 In reply to Brian.

There are ways to do that, but it’s actually fairly complicated. I’ve seen some discussions on the ServiceNow community about this, but haven’t really seen anything that covers all of the bases outside of what we do at Crossfuze in our turnkey change product.

We allow the user to do 2 things. The first is that they can change the ‘Type’ field as long as the change is in a draft state. This allows for some flexibility in selecting the change type before you get into the full workflow. The second thing we’ve done is create a custom interceptor concept that routes the user to an intermediate record producer form that allows us to ask for details about the change…type, etc. before actually creating the change. Since it’s a part of our proprietary code base, I can’t share the details, but I would be willing to do a demo of the solution for you if you’d like to take a look.

]]>
By: Brian https://servicenowguru.com/ui-actions-system-ui/copy-ui-action-change-requests/#comment-5907 Fri, 16 Aug 2013 15:51:55 +0000 https://servicenowguru.wpengine.com/?p=342#comment-5907 Hello Mark. The script is absolutely perfect and I love it. One question or maybe just guidance…..In our organization, we have the user first specify what type of change they are creating. This is using an interceptor. We have separate work flows for each change type. It is common for a user to create an Emergency Change when they should have created an Urgent change. We also make the Change Type read only to keep the user from selecting one type and changing it to another and possibly bypassing parts of our process.

My question is, how can I incorporate this script but allow the user to select the Change Type so that the appropriate work flow is associated.

Thanks again.

]]>
By: Mark Stanger https://servicenowguru.com/ui-actions-system-ui/copy-ui-action-change-requests/#comment-5906 Tue, 27 Mar 2012 21:29:53 +0000 https://servicenowguru.wpengine.com/?p=342#comment-5906 In reply to Dave.

I’m not sure what might be the issue. These scripts have been tested and verified before. Please try copying and pasting from here and testing in a ServiceNow demo instance.

]]>
By: Dave https://servicenowguru.com/ui-actions-system-ui/copy-ui-action-change-requests/#comment-5905 Tue, 27 Mar 2012 18:34:07 +0000 https://servicenowguru.wpengine.com/?p=342#comment-5905 When such a UI action is executed my browser shows and error – “current not defined”, and nothing is written to the record I initialized.

]]>