Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Suggested answer

Delete 2 custom fields from CustTable in safety

Posted on by 1,085

Hi,

I have need to delete two custom (not standard) fields (e.g CustTable.A_Field1, CustTable.A_Field2) from my CustTable in production environment (cus level).

There's been some mess with fields id (these two fields have different id in test environment and prod environment, so i need to delete them from prod and bring the test env. version in prod again)

What's the best way to delete them without corrupting data inside CustTable?

Is there some kind of best practice, check-list to follow?

Thank you in advance

regards

  • sohaibcheema Profile Picture
    sohaibcheema 46,594 User Group Leader on at
    RE: Delete 2 custom fields from CustTable in safety

    sorry guys the question is related to AX2009, and my last reply is totally invalid here as the reply is related to AX2012. Apologies for not noticing Tag of question.

    Thank you!

  • sohaibcheema Profile Picture
    sohaibcheema 46,594 User Group Leader on at
    RE: Delete 2 custom fields from CustTable in safety

    I would like to add here a point that this is the reason they recommend to use ModelStore while transferring customization from TEST to Live

    technet.microsoft.com/.../hh352326.aspx;MSPPError=-2147217396

  • Anton Venter Profile Picture
    Anton Venter 18,474 Super User 2024 Season 2 on at
    RE: Delete 2 custom fields from CustTable in safety

    Hi, since there is no data yet for those two fields, deleting the two fields from the table in the AOT will be safe. There is no risk for other fields in the table, the fields will just be dropped from the table. Remember to synchronise the database after deleting those two fields. Why not correct the ID's in the other environments like suggested?

  • sohaibcheema Profile Picture
    sohaibcheema 46,594 User Group Leader on at
    RE: Delete 2 custom fields from CustTable in safety

    there is a dirty trick you can play around, but try this on test environment first

    smcdax.blogspot.com/.../dynamics-ax-database-synchronization.html

  • vv1984 Profile Picture
    vv1984 1,085 on at
    RE: Delete 2 custom fields from CustTable in safety

    Hi André,

    my Ax version is 2009.

    Loss of data saved in those two fields is not a concern. I just have to be sure that other fields' data is completely safe, this is very important.

    Do you reccomend a backup anyway?

    Thank you for helping

    regards

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 290,326 Super User 2024 Season 2 on at
    RE: Delete 2 custom fields from CustTable in safety

    Hi Win32,

    I assume you are using AX 2009 as you used this tag. The answer for AX 2012 would be different.

    If you delete the fields from production, AX needs to synchronize and you will lose the current data in these two custom fields. If there is no data in these two fields yet, you can delete them. Make sure you have a valid backup before starting this task.

    If you do have data, it might be better to align the field ID's in the test environment

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,326 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,166 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans