- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2020 08:43 PM
I have a requirement to update OTB Copy Change UI action to clear out 'assigned to' fields value on related list task (change_task) level at record creation. So that means when someone copy the change through 'copy change' UI action "assigned to" field should not be copied into change_task level.
I red another post and worked out how to clear out "assigned_to" field on parent change record level but not the change_task. Can someone provide some information?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2020 08:56 PM
Hi,
so you don't want to copy change task "assigned_to" when copy UI action is clicked
there is this system property
1) com.snc.change_request.copy.rl.change_task.attributes -
List of attributes (comma-separated) from Change Task (change_task) related list that will be copied from the originating change
OOB it has values as -> cmdb_ci,priority,assignment_group,assigned_to,short_description,description
remove assigned to from the list and try once
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2020 08:52 PM
Hi,
In Copy Change UI action try below script,
var gr =new GlideRecord('change_task');
gr.initialise();
gr.field_name = current.fieldName;//copy all the field and stored in new change task
gr.field_name = current.fieldName;//copy all the field and stored in new change task
gr.field_name = current.fieldName;//copy all the field and stored in new change task
gr.assigned_to = ' '; //here dont copy current table assigned To
gr.insert();
I hope it will help you
Please Mark Correct/Helpful answer if it help you in any way.
Thanks,
Kunal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2020 08:56 PM
Hi,
so you don't want to copy change task "assigned_to" when copy UI action is clicked
there is this system property
1) com.snc.change_request.copy.rl.change_task.attributes -
List of attributes (comma-separated) from Change Task (change_task) related list that will be copied from the originating change
OOB it has values as -> cmdb_ci,priority,assignment_group,assigned_to,short_description,description
remove assigned to from the list and try once
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2020 09:13 PM
Thank you. It worked like magic.
Just one more question to understand this script.
In 'copy change" UI action or 'changeUtils' script include does not call this sys_property (com.snc.change_request.copy.rl.change_task.attributes) at all.
Could you please let me know in which line this property call into this UI scripts?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2020 09:18 PM
Hi,
this is the script include -> ChangeUtilsSNC
Copy Change UI Action calls -> ChangeUtils and this calls ChangeUtilsSNC
URL -> https://instanceName.service-now.com/nav_to.do?uri=sys_script_include.do?sys_id=2ddf83eb9fa331002920bde8132e7044
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader