Upgrade only Table objects fields without Code behind and Globals/Locals

Hello, I'm just wondering if someone knows a fast way to upgrade only table objects and there only fields without the code behind and any Globals/Locals in these objects.

For sure we can do this in a known way with deleting unused code. Does anyone know a good script or tool for that?

Best Answer

Answers

  • Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    Import Worksheet, use Merge New >- Existing?
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • pleachim@outlook.compleachim@outlook.com Member Posts: 24
    Hey Slawek,
    yes that would nearly work. But ...

    What I know is that after the Merge fields get mixed up. So fields I have in as example 2009 will be kept there for the 2013 version. I thought for a solution where we can just import fields 50000..99999 from 2009 into 2013. I forgot to mention this.

    So we have a correct 2013 table file with only the modifications. No unused fields.

    Because it's a merge ... so it will always add.

  • Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    New->Existing gives you intermediary stage where both old and new fields are present so you can run data upgrade routines.

    The custome fields alone can be easilly copied in Object Designer, just designe a table, select a bunch of custom fields, copy and paste in new system. Also they can be easilly added in any text merging tool.

    The real problem is to get new standard fields, and merge helps in that you end up with both old and new fields which in turn let you to run upgrade code.
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • JuhlJuhl Member Posts: 724
    Side info:
    If you tick the ISV Insert Rights, when downloading your developer license, you can insert standard fields.
    Follow me on my blog juhl.blog
  • pleachim@outlook.compleachim@outlook.com Member Posts: 24
    Hi sorry for the late answer. I definitly know how to upgrade a database. And I already know that I can copy fields ...

    The thing is if I copy the fields I also copy the code and the variables.

    But I just want the field. Nothing else except the field. And with the merge functionality I have indeed all fields from both versions. But I do not want the fields from both versions as explained. I just want my fields which I are not standard in the base versions (old version). Also powershell merge will transport the code. I will check if I can modify the MergeTool. Maybe this can do the trick.

  • pleachim@outlook.compleachim@outlook.com Member Posts: 24
    When I have to have only fields I open the database in old editor, edit object's code, Ctrl+A and delete everyting. This of course does not get rid of local vars, but at least I do not risk some OnValidate code to be accidentally executed.

    For a batch of objects it would be a pain in the ... though.



    Seems to be the only chance ... "up to now" :)
Sign In or Register to comment.