Move a table that is extended from task to sys_metadata

bradwestvig
Giga Guru

We have create some tables that are extended from task.  This was done incorrectly and I want to extend it from sys_metadata (Application File) to be included in our application.  The data is a part of our core application code and needs to be migrated when the application is installed, or when we update it.

Any thoughts on a way to migrate these changes?

1 ACCEPTED SOLUTION

bradwestvig
Giga Guru

To update this post I opened up a HI ticket with Support and they helped me reparent the tables.  They have an API that does it, but its not available for end user usage.  The tables have now been reparenting and are working as expected.

View solution in original post

6 REPLIES 6

Alright, glad you got it resolved. For those who wish to do this, this is probably the preferred method however, if you wish to attempt this on your own, my response above does work as I've used it before in testing.

Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

DB1
Tera Contributor

Hi,

I wanted to list all the Application files below a particular Studio Application.

Have drafted a code

function copyApplicationfiles(gr) {
gs.info("===> Application Files");

var classname = '';
var records = [];
var sno = 1;
while (gr.next()) {
//gs.info(gr.sys_class_name + " class:"+ records.length + " Find: "+records.indexOf(gr.sys_class_name));
if(gr.sys_class_name != classname) {
sno = 1;
classname = String(gr.sys_class_name);

gs.info("-------------\n");
gs.info("*** Class Name: " + gr.sys_class_name.getDisplayValue());
gs.info('#\tName\tTable\tCreatedBy');
}
gs.info(sno + '\t' + gr.sys_name + '\t' + gr.sys_class_name.getDisplayValue() + '\t' + gr.sys_created_by);
sno++;



}

}

//var fileoutputstr = "";
var appID = '6ead8e780f603200cd674f8ce1050ed1';
gs.info("\n*** Application Name: " + appID);
var gr = new GlideRecord("sys_metadata");
gr.addQuery('sys_scope', appID);
gr.orderBy('sys_class_name');
gr.query();
gs.info("*** URL Matches Found: " + gr.getRowCount());
copyApplicationfiles(gr);
//while (gr.next()) {
//gs.info("Class " + gr.sys_class_name);
//}

 

However, need help to download this extract/output as CSV file and also want this to be attached as record in sys_attachment table. Could anyone help on the same?