
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 04-13-2021 10:14 AM
I get this error when deploying a component to an instance in my organization for the first time, but after it's been deployed to another instance (or a prior clone of the same instance).
I'm still waiting on HI to confirm the rumor, but it appears that scopes are stored somewhere outside of the instance you've deployed to. The rumor is also that a HI ticket is required to purge the scope so it can be deployed again. EDIT: HI confirmed that scopes are created in the application repository https://apprepo.service-now.com, where they can be cleaned out every time if you want (see this link). Or you can deploy to the repository mid-development and follow a convoluted release process. Better ideas below:
Here are a few other options if you get this error:
- Change the scope name in the now-ui.json file every time you deploy (this is silly, but you may want to do it this time if you're stuck on this error and you don't want to mess with XML - see option 4 if you're feeling bold)
- Export the update set created by the deployment in the first instance and first deploy that before applying any changes made to your component. This is about as silly as deploying from the repository first as HI recommends.
- Export only the sys_scope record XML. You can then import this XML to each subsequent instance to pre-create the scope prior to deploying your component. This is my method for now. If I get clever later, I may build it into a deploy script that wraps now-cli deploy. I am working on a major release with multiple components and scopes, so I created a single update set with all my scopes.
- XML manipulation option: if you really want to use the scope name you first deployed, and you don't have the original sys_scope record (say you cloned over the instance), you can export a different scope and edit the XML. I've tried it. It works. But I can't tell you if it's a good idea. Don't forget to change the sys_id to something other than what you exported.
- 3,503 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Amazing. I got the "scope is already taken by another application" error when creating a scoped app that had been created in Dev three months ago, and then deleted. What a mysterious process. Great job on this article!
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Lost my sys_scope record due to a clone. So had the update set with about 50 records in that scope. I could not recreate the scope due to the application repository(also would have a different sys_id). So #4 did the trick! Thanks Foster for the article - great save, update set committed with no errors!
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Try to create custom component in VS code. But when I try to create a scope I'm facing this issue
Tried with alternate name as well but It is not working
@Marc Mouries @Nia McCash can you guys please assist me on this