Unable to deploy changes in scoped app using AEMC

haribalaji02
Tera Contributor

Scenario: Existing scoped application(catalog form) - Changes applied to the form via app engine studio and submitted for review. App engine admin published the application. In App Engine Management Center - deployment request created but when approved for deployment to target instance (Dev to test) - receiving an error "deployment_error_details":"App with sys_id 4e84c2d4c3378690176e991c05013141and version 1.0.1failed to deploy to environment with URL https://aznextgentest.service-now.com.\nHttp status: 409\nStatus: 3\nStatus label: Failed\nStatus message: \nStatus detail: \nError: A Custom Application record with the requested scope is already present on the instance. Convert to a Store Application via the Custom Application form in order to install new versions from Application Repository\n"}"

 

Any suggestions/solution to solve this problem would be much appreciated. Thank you.

2 REPLIES 2

WORKFLOW-COWBOY
ServiceNow Employee
ServiceNow Employee

It sounds like you're encountering this error because the application was previously deployed using an Update Set, which creates the Application record in the [sys_app] table instead of the [sys_store_app] table. This can be a bit confusing if you’re using the App Engine Management Center (AEMC) for the first time.

 

The key here is understanding how the App Repo works. AEMC relies on the App Repository for publishing applications, which is a hosted solution that has been part of the ServiceNow platform since the introduction of the green Studio (around 2016). Essentially, App Repo acts as a private ServiceNow Store for your company's instances.

 

When you install apps from the App Repo or the ServiceNow Store, the Application record gets created in the [sys_store_app] table rather than [sys_app].

 

In your case, the deployment is failing because the application already exists in the target environment as a Custom Application (stored in [sys_app]). To resolve this, you’ll need to convert the application to the App Repo format.

 

Here's how you can fix this:

  1. Navigate to the Custom Application record in the [sys_app] table with sys_id 4e84c2d4c3378690176e991c05013141. You can access the record directly using this URL:
    https://aznextgentest.service-now.com/nav_to.do?uri=sys_app.do?sys_id=4e84c2d4c3378690176e991c050131....

  2. Scroll down to the Related Links section on the record and click on Convert to Application Repository Mode. This will move the application from the [sys_app] table (Custom Application) to the [sys_store_app] table (Store Application), allowing it to be managed via the App Repo.

  3. Once the conversion is complete, you may want to cancel the current deployment request and submit a new one.


I also have a demo video on my YouTube channel that walks through how the App Repo works:
App Repo Demo Video.

 

Here is an image of the data model for packages, plugins, and applications. I find it very useful for helping to understand the relationship between Apps, Store Apps, and Plugins.  

WORKFLOWCOWBOY_0-1727788684932.png

 

--------------------------------------------------
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful." This action benefits both the community and me.

Thanks!


--------------------------------------------------
Workflow Cowboy
LinkedIn: https://www.linkedin.com/in/dalestubblefield/
YouTube: https://www.youtube.com/@starlordnow

jasonutah
Tera Contributor

@WORKFLOW-COWBOY I'm interested to know if publishing the application through ServiceNow Studio will accomplish converting the application to an app repo version. I have been publishing via ServiceNow Studio and found that the apps become available as app repo apps.