Rename CDT

A common question - how can we rename a CDT in an application? I know there is no 'obvious' way of renaming a CDT / namespace, but we need to create a new CDT and replace the references of existing CDT with new CDT.
As an alternative approach, can we do the following steps?
1. Export the full application
2. Unzip the contents of the application
3. Find & Replace the occurrences of that CDT in all files within the extracted folder with the new CDT name. I could see all exported contents are XML files in general, so find & replace should be easy (unless Appian uses the CDT name in different ways in different files)
4. Zip the modified folder
5. Upload the updated application zip file
We need to change CDT names for quite a few of the CDTs and just wondering if the above approach is safe from an application consistency and recommendation standpoint. Thanks in advance.

OriginalPostID-243123

  Discussion posts and replies are publicly visible

  • Hello Soumya,

    Not sure above approach, If CDT referred in many places like in rule and process model files, You need to go one by one and each file check the references and update. Which is same as go in process model and update with new cdt. In code level, go and changes bit risk. Changing CDT name never need to be too priority, where we can risk the functionality break. CDT name is not bussiness data and if spelled wrong or something. CDT name not going to display anywhere.

    However, if still want to change. first Take a backup of all the CDTs :

    Do below for each CDT one by one.

    - Create new CDT with a new name.
    - Go to the CDT which need to change(old CDT), add a new field and save.
    - After save you will get a list of the object depends on an old version of this data type.
    - Update all those objects until all reference with new CDT created at step 1
    - Test the related functionality
    - Get next CDT.
  • Adding to @sushil kapoor comment, there is another way of doing it. Create a new cdt which is duplicate of old cdt. Now open old cdt and click on gear icon and then click on dependents. It will show you all the places where your old cdt is referenced. Now manually change. I hope this information might be helpful.
  • Thanks sushil , kondetiv.
    This is what I anticipated and mentioned in my primary approach. Unfortunately we can't avoid renaming CDTs. Thanks again for your comments.