Receiving 'Element is using storage alias' error when attempting to change dictionary column type

Troy S_
Kilo Expert

I have 2 custom fields that I need to change from a string to HTML.   However every time I attempt this I get the following error "Element is using storage alias.   Cannot modify this element's type because it shares a storage alias:[task.u_test shared with 2 total element(s)].   I was able to change a couple of them that where not custom fields.   I know there is a work around, but I do not/cannot delete it and rebuild it as it contains information that is still needed for past changes.

Thank You in advanced

Troy

1 ACCEPTED SOLUTION

Chuck Tomasi
Tera Patron

Hi Troy



This is due to a feature in the platform known as task flattening. This was put in place in Dublin as a performance enhancement at runtime. Several string fields on various tables are using the same physical database field to store information. As a result, you cannot change your field type because it would impact the other fields.



Your best bet is to create a new field of type HTML and migrate your information from the string field to the HTML field (if you wish to preserve the content.)


View solution in original post

12 REPLIES 12

Yes. If the field is shared among other tables (as many in the task hierarchy are) you'll get a message like this. It is less common on fields you create on your tables.


This is what I did though, I made a brand new Date/Time field on my incident table for testing, and then when trying to change it to "Due Date" type (Date was not available.. what I really wanted to change it to) provided this error. Do you know of a way to get the field changed over to the glide_date type instead of glide_date_time?


The best way to change it is:


  1. Create a new glide_date field
  2. Copy over the values from the old to field to the new
  3. Remove the old field

Oh for sure, but this would have to be done for hundreds of production Project records... would glide_date_time entries be compatible to automatically migrate to a glide_date field?


Yes. I just did a quick test in scripts background like this. It took '2017-05-31 09:33:02' and saved it in the date field exactly as 2017-05-31



var r = new GlideRecord('tableName');


r.get('SYS_ID');


r.date = r.date_and_time;


r.update();