Comments on: ‘Copy’ UI action for Change requests (Part 2!) https://servicenowguru.com/ui-actions-system-ui/copy-ui-action-change-requests-part-2/ ServiceNow Consulting Scripting Administration Development Wed, 06 Mar 2024 22:07:42 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Mac https://servicenowguru.com/ui-actions-system-ui/copy-ui-action-change-requests-part-2/#comment-7281 Fri, 08 Aug 2014 14:22:33 +0000 https://servicenowguru.wpengine.com/?p=1838#comment-7281 Genius Mark – works perfectly! Thanks very much for your help, I really appreciate it…

]]>
By: Mark Stanger https://servicenowguru.com/ui-actions-system-ui/copy-ui-action-change-requests-part-2/#comment-7280 Fri, 08 Aug 2014 13:44:49 +0000 https://servicenowguru.wpengine.com/?p=1838#comment-7280 In reply to Mac.

Try the updated scripts above and see if that works better for you. I’ve added checks for that property to make sure the UI action doesn’t copy the primary CI if the business rule is going to run.

]]>
By: Mac https://servicenowguru.com/ui-actions-system-ui/copy-ui-action-change-requests-part-2/#comment-7279 Fri, 08 Aug 2014 13:14:09 +0000 https://servicenowguru.wpengine.com/?p=1838#comment-7279 In reply to Mark Stanger.

I debugged the Business Rules and found out what’s causing the problem. We have the Conflict Properties Mode set to ‘Advanced’, which fires the ‘Add CI in affected Cis List’ business rule. This is what is duplicating the main Config Item in the Affected CI’s list.

Our Change Manager wants this property left on ‘Advanced’. Not being much of a scripter, would it be possible to add something to the business rule condition or the end of your script to stop the rule firing when we use the ‘copyChange’ function?

]]>
By: Mark Stanger https://servicenowguru.com/ui-actions-system-ui/copy-ui-action-change-requests-part-2/#comment-7278 Thu, 07 Aug 2014 14:27:37 +0000 https://servicenowguru.wpengine.com/?p=1838#comment-7278 In reply to Mac.

Thanks for the comment. Good luck finding the issue in your system!

]]>
By: Mac https://servicenowguru.com/ui-actions-system-ui/copy-ui-action-change-requests-part-2/#comment-7277 Thu, 07 Aug 2014 14:17:21 +0000 https://servicenowguru.wpengine.com/?p=1838#comment-7277 In reply to Mark Stanger.

I always forget about those Demo Instances; sorry I’m fairly new at this ServiceNow stuff…

Doesn’t happen on Demo, so must be something we’ve done. I’ll do some digging around in our Dev Instance to see if I can find the problem.

BTW, I’ve learnt loads from your site, it’s really helped me out a lot. Thanks very much for the quick reply and for pointing me in the right direction!

]]>
By: Mark Stanger https://servicenowguru.com/ui-actions-system-ui/copy-ui-action-change-requests-part-2/#comment-7276 Thu, 07 Aug 2014 13:25:42 +0000 https://servicenowguru.wpengine.com/?p=1838#comment-7276 In reply to Mac.

First thing you should do is set the UI action up in a ServiceNow demo instance and make sure that it’s not doing the same thing there. That will tell you if the problem is with the UI action or something else unique to your system. Assuming the problem is unique to your system, I would check to see if you’re running multiple updates (using current.update()) in any business rules on your change table. You should also check the ‘task_ci’ table to see if it is using business rules to automatically insert affected CIs.

]]>
By: Mac https://servicenowguru.com/ui-actions-system-ui/copy-ui-action-change-requests-part-2/#comment-7275 Thu, 07 Aug 2014 11:27:09 +0000 https://servicenowguru.wpengine.com/?p=1838#comment-7275 Hi Mark,

I’m just testing your ‘Copy Change UI action’ script in our Dev Instance and it works almost perfectly ;) Unfortunately, every change I copy is duplicating the Affected CIs.

The only things I’ve changed are to comment out the copyTask(chgID); line as I don’t want to copy Change Tasks and I’ve added a couple of our specific user fields into the newchange section at the top.

I’m not much good at scripting, so any pointers would be really appreciated!

]]>
By: sanjeev kumra https://servicenowguru.com/ui-actions-system-ui/copy-ui-action-change-requests-part-2/#comment-7274 Wed, 15 Jan 2014 12:20:08 +0000 https://servicenowguru.wpengine.com/?p=1838#comment-7274 Hi All,

How we copy request created from record producer.

]]>
By: Chris K https://servicenowguru.com/ui-actions-system-ui/copy-ui-action-change-requests-part-2/#comment-7273 Wed, 18 Sep 2013 14:33:33 +0000 https://servicenowguru.wpengine.com/?p=1838#comment-7273 In reply to Chris K.

Using the following script works fine but not all of the variables get cloned over

]]>
By: Chris K https://servicenowguru.com/ui-actions-system-ui/copy-ui-action-change-requests-part-2/#comment-7272 Fri, 13 Sep 2013 18:22:55 +0000 https://servicenowguru.wpengine.com/?p=1838#comment-7272 Hi Everyone, is there a way to clone a change request that has custom variables in the template?

]]>