How do I change the field type?

ChuanYanF
Tera Guru

Dear experts,

 

I would like to change the field type for the core_company, vendor_manager field from list to reference. But it comes out an error like this. How do I solve this issue?

ChuanYanF_0-1753090386884.png

 

6 REPLIES 6

tejas1111
Tera Contributor

Hi @ChuanYanF ,

In ServiceNow, field types cannot be changed between incompatible types. Specifically:

  • You are trying to change a field (likely Vendor manager) from List (i.e., a list of references) to a Reference field (i.e., a single reference to another record).

  • This is not allowed, because a List field can store multiple values, whereas a Reference field can store only one value.

ServiceNow blocks this to prevent data loss or corruption — if a record already has multiple values, converting to a single-value reference would be ambiguous.

 

Option 1: Delete & Recreate the Field

If you don’t need to preserve data in that field:

  1. Delete the Vendor manager field from the table.

  2. Create a new field with the same name, but choose the correct type: Reference.

Warning: This will delete any existing data in that field.

 

Option 2: Create a New Field

If you need to preserve the existing List data:

  1. Keep the current Vendor manager field as-is.

  2. Create a new Reference field (e.g., Vendor manager ref).

  3. Gradually migrate data as needed.

 

if you have to change the field type you can write a background script but if not best practice . you will lose lot of data 

Hi @tejas1111 I have tried the background script during my replication and it is not possible.

However you can change it from List to String and then from String to Reference. But it will lose all the reference qualifier etc so it must be properly backed up (at least screenshots of all the tabs).

CC: @ChuanYanF 

———
/* If my response wasn’t a total disaster ↙️ drop a Kudos or Accept as Solution ↘️ Cheers! */


Ankur Bawiskar
Tera Patron
Tera Patron

@ChuanYanF 

it clearly says you are not allowed to change the field type.

Is that a custom field or OOTB one?

If it's OOTB don't change the type.

If it's custom then you can delete that and create a new field with that type.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

GlideFather
Tera Patron

Hi @ChuanYanF 
I replicated the same issue and then I couldn't resolve it myself 😄

 

Tried:

  • elevated to sec admin,
  • export xml, change it and import,
  • deactivate the record, change and activate,
  • deactivated BR that validates it.

But then I got !!! Change it from List to String, save it and then from String to Reference.
However mark everything because it will lose the Reference qualifier, the reference table etc. copy everything from the current record before this change...

———
/* If my response wasn’t a total disaster ↙️ drop a Kudos or Accept as Solution ↘️ Cheers! */