Delete Button not Visible

ursnani
Giga Guru

Hi All,

I ran into an strange issue.

I have created a Application scope and from that Application scope i have added a field to the Table which is in Global Application scope. Now I want to delete that field but I don't know for some reason i was unable to see the Delete button to delete that Field

Can someone please let me know the possible reason for this and a way to delete that Field.

1 ACCEPTED SOLUTION

You can use below background script to delete column.

Again, make sure that you are in correct scope

 

Following is sample code. Change query as per your requirement.

var dict = new GlideRecord('sys_dictionary');
dict.addEncodedQuery('name=u_test_fix^element=u_out');
dict.query();
while(dict.next()){

dict.deleteRecord();

}

 

Regards,

Sachin

View solution in original post

12 REPLIES 12

Another option is to make column inactive in dictionary.

 

find_real_file.png

 

 

I already made that Inactive but I want to delete that field completely from the table

You can use below background script to delete column.

Again, make sure that you are in correct scope

 

Following is sample code. Change query as per your requirement.

var dict = new GlideRecord('sys_dictionary');
dict.addEncodedQuery('name=u_test_fix^element=u_out');
dict.query();
while(dict.next()){

dict.deleteRecord();

}

 

Regards,

Sachin

Hi Sachin,

 

Can you please let me know what is the Query and what I should give 

I am little confused with that query.

Should I give like

var dict = new GlideRecord('sys_dictionary');
dict.addEncodedQuery('name=my field name^element=u_out');
dict.query();
while(dict.next()){

dict.deleteRecord();
}

Please use below sample 

 

dict.addEncodedQuery('name=u_test_fix^element=u_out'); // name is table name and element is column name.

 

Regards,

Sachin