Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Migrate scoped app from developer instance to company instance

jason_lau
Tera Contributor

Hi,

If you create a scoped app from a developer instance (organization-code = 12345), is there a way to migrate or convert that application to your company namespace (for example: organization-code=myco)?

Or if you create a scoped app from a developer instance and you want it under your company namespace, do you have to rebuilt the objects into that new namespace?

Basically, I created some scoped apps in a developer instance before we got our company instances and I'd like to see if theres a way to change/migrate the scoped app(s) to new namespace. I'm assuming that even if it's possible there would be some manual search/replace work needed to be done, for example in include script which references a scoped application table (x_12345_appname_tablename, etc).

Thanks!

Jason

1 ACCEPTED SOLUTION

Further investigation says you can update all artifacts by querying table sys_metadata


var gr = new GlideRecord('sys_metadata');  


gr.addQuery('sys_scope','821b35cd4f442200bbc32d118110c7f2'); //sys_id of the first scoped app


gr.query();


while(gr.next())


{


gr.sys_scope = '96784d274f10e600bbc32d118110c7de'; //Update with correct scope i.e newly created scoped app  


gr.setWorkflow(false);  


gr.update();  


}



To round of testing by creating a sample app and updating it to new the app.


View solution in original post

10 REPLIES 10

Yzy
Giga Contributor

I'm sorry that I have some question and need help.

How to import app into another instance? Use update set or github?