Copy Change Modification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2025 04:29 AM
We added a custom field to Change Request which indicates the environment the Change is slated for. The choices are QA or Production. We added a few additional custom fields related to this. These are copy_to_prod (true/false) and related_change.
We made a copy of UI Action Copy Change and named it Copy To Production. Copy To Production is available when the environment is QA. That is, you can make a copy of a QA change and slate it for Production. Copy To Production is available regardless of the type - Normal, Standard, Emergency.
This is working in our Production instance which is Xanadu Patch 4a. We cloned our Production instance to our Development instance and upgraded our Development instance to Xanadu Patch 6.
We discovered that Copy To Production is no longer working correctly in our Development instance.
In the Copy To Production UI Action we are defining 3 additional parameters:
Then we are passing those parameters to sysparm_query as follows:
...
In our Development environment we are now seeing the following behavior for Copy To Production:
- Normal Change - environment not set to Production but copy_to_prod and related_change appear to be set correctly in the newly created change; the environment in the newly created change remains QA
- Standard Change - environment not set to Production but copy_to_prod and related_change appear to be set correctly; the environment in the newly created change remains QA
- Emergency Change - environment set to Production and related_change is set correctly but copy_to_prod is not
It appears that ServiceNow made changes to script include ChangeUtilsSNC in Xanadu Patch 6 - specifically to function _getRecordValuesAsEncodedQuery.
Has anyone else run into this issue in Xanadu Patch 6?
How can field values be adjusted when copying a change?
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2025 04:40 AM
did you debug and see where it fails?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2025 04:46 AM
I have not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2025 05:07 AM
please debug
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2025 05:30 AM
Sorry, but I'm not exactly sure what to debug. I suspect the issue is in function _getRecordValuesAsEncodedQuery in script include ChangeUtilsSNC.