How to get id of deleted custom field

Hi! Unfortunately, we often have cases where someone accidentally deletes an important custom field.
We warn project managers to put blockers on editing important custom fields, but you can’t keep an eye on everyone :grin:

My question: How to find out the ID of a deleted custom field? (I know name of custom field, project where this field was used, space id)

As far as I can see from the official documentation, the custom field can be easily restored via the Update a custom field but it required custom_field_gid and I don’t know how to get it :disappointed_relieved:

Hi @Иван_Рязанов ,

A few questions:

  1. Are these global custom fields, local custom fields, or a mix of both?
  2. Have you considering locking these fields to only one editor (hopefully there will be more permission control for fields soon!)?
  3. Are people deleting the fields, removing them from projects, or a mix of both?

The endpoint you referenced in your post is primarily used to update the settings of existing fields (e.g., the precision of numbers, name of the field, etc.) AFAIK, if a field is deleted, there’s not a great way to recover it via the API, as that GID will theoretically no longer exist in your environment. I believe Asana support can recover this for you if it’s relatively recent.

Hi!

  1. Global custom field from a shared library- but there are all kinds of situations :smile:
    2.Yeah, but sometimes someone misses that setting.
  2. There delete from space (it’s more critical and affects other teams)

@Иван_Рязанов - as far as I know, there’s not an easy way to recover a deleted field via API (if it’s just been removed from a project, it’s of course easy to just go and add it back in). If you are an admin of your org, you could do an audit log export with a filter for custom field deleted. This should give you event info about the deletion (including GID, I believe), but I still don’t know how you would restore that field without Asana’s support.

@Stephen_Li Thanks for your answer! Unfortunately audit log works only on the “Enterprise+”

@Иван_Рязанов,

You can do a custom field export using this tool:
https://tools.ido-clarity.com/asana/custom-field-explorer

@Stephen_Li is correct on the main point; there’s no way to recover a deleted custom field via the API, the only possibility is via Asana support.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.