The ServiceNow Nerd

The musings of a ServiceNow platform developer and enthusiast

The SN Nerd

How to prevent “Cannot commit Update Set” issues in your instance

by snnerd
Published: Last Updated on 2,954 views

Preventing the “Cannot commit Update Set :Update scope id is different than update set scope id” error once and for all

Since the introduction of Application scopes in the Fuji release, the new paradigm has introduced more contemporary application development features into the tool, making development on the platform more attractive. It started with facilitating integration with GitHub and advanced with features like delegated administration and facilitating containerisation and intellectual property protection when delivered via the ServiceNow store. It also enables protection from other applications through scoped privileges and can help package products for easy deployment neatly.

As application scopes become the norm across the platform, it is not uncommon to be working across multiple scopes to change the configuration. Take setting up the Employee Centre, for example. To modify the Service Portal record, you need to be in the Employee Center Core application scope. Want to modify the theme? Better get into the Employee Center scope. Time to create your taxonomy? You’ll need to change to the Employee Center Core scope. You may also encounter similar problems when working with ETL’s and Service Graph Connectors.

We do our best to make sure we are in the correct scope, but sometimes, somehow, updates from other scopes end up in Update sets where they do not belong.

When updates from other scopes creep in


Update sets that contain mixed Update Sets can be closed but cannot be committed with updates that do not match the scope of the Update set, resulting in an error in preview which cannot be remediated. As outlined by ServiceNow in KB0743551, all Customer updates need to be in the same scope as the Update set. So, other than improving our own Update set management practices, how do we prevent this from happening in the first place?

  1. Download Invalid Scope Update Set Fixer from ServiceNow ShareNavigate to ServiceNow Share through the provided link and download my Invalid Scope Update Set Fixer application. You’ll need to be logged into the Developer site if you want to download anything from Share. If you are already logged into the ServiceNow Community, you might need to log in twice for the authentication to work.

    And yes, it is contained within its own application, but due to the nature of this utility, it has to sit snug in the global application scope. The application is called MVPUpdateSetScopeCheck because some of the code was written while I was live-streaming a Live Coding Happy Hour with other 2021 Developer MVP’s.

    Check out blogging legend and fellow Developer MVP @Mark Roethof solution here. He has also blogged extensively on this subject.
  2. Import Update XML set into your instance and commit Update setNavigate to ‘System Update Sets > Retrieved Update Sets’ and select the ‘Import Update Set from XML’ Related Link at the bottom of the page. Next, browse to the downloaded file’s location and select XML file name starting with “MVPUpdateSetScopeCheck” to import the Update set into your instance. Once imported, refresh the page and look for Update Set starting with “MVPUpdateSetScopeCheck”. Finally, navigate to the Update Set to preview and commit.
  3. Scan your current Update sets to detect issuesNew UI action can be used from list action to check multiple update sets or from the related list to check individual update sets for customer updates in an application scope that does not match the Update set.

     
  4. Closing Update sets with mixed scopes is no longer possible – try it!It should no longer be possible to get ‘Invalid Update Set’ issues in your upstream environments because it is no longer possible to mark mixed scope Update sets as ‘complete’. If you don’t like this functionality, you can disable it by setting system property ‘updateset.prevent.completionofmixedscope’ to false.

  5. Remediate any issues automatically via UI actionTo remediate these errors, use the ‘Move Invalid Scope Updates’ UI action and all Updates that do not match the scope of the Update set will be moved into their own scoped Update set, automatically created for you as a child of the parent. 



    Once remediated, you can move your Update sets through your environments without fear of seeing this error.


Related Posts

Leave a Comment

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More