Why am I missing the uninstall option for a custom application?

Brad59
Giga Guru

I need to uninstall my Globally scoped application from a sub-production instance so that I may reinstall from a code repository.

I have deleted/moved all application files out of the app. I also deleted all of the sys_metadata records for the app.

find_real_file.png

EDIT:
There is a condition on the Uninstall UI Action that I believe I am failing. However, the script include referenced appears to be hidden. 

new GlideAppLoader().canUninstall(current.scope.toString(),current.sys_code.toString())

find_real_file.png

8 REPLIES 8

Corey19
Tera Expert

Hi, I know this is an old question, but in case this is needed later. The OP has mentioned the app is globally scoped, if an app is in the global scope, they aren't available for uninstall from what I can determine.

Cheers,
Corey

Louis22
Tera Contributor

I found a solution (a second one that was removed for the sake of removing it, becouse if things get to complex you can shoot yourselve in the foot.):

1. Make backup of everything

2. Can you reaply said backup to your development instance and are able to publish again

3. Enable development mode for application

3. Go to application (sys_store_app related list -> installed files) and move everything to proper Application with SN OOTB related list function.

4. If application is empty deleted it (else you get a important error message, that i do not want to ignore)

5. Reaply did work on dev instance for testing.

6. Deleting app removes it from "my company applications" etc.

 

Thats a rather slick solution! But for this instance, bear in mind the OP is referring to an app in the global scope rather than a scoped app.

 

Cheers,
Corey

Louis22
Tera Contributor


This is true, anyhow this approaches worked for me.
I edited my original reply with aditional information.

Make sure to use the "Move to Application..." feature in the sys_store_app table. This moved all the entries to the proper Global Application. This will be difficult for scoped application or propably not possible (not topic relevant, but...)?

The drawback is, when you apply an update set, servicenow will tell you you modified your values and there is a conflict.

This is also written in the carefull error message, when you delete the application.