Creating fields and tables by code

karstenrobertkarstenrobert Member Posts: 27
Hi,
I can use the fields table to create new fields and even new tables.
That works quiete well.
(I wouldn't want to create a few hundred fields manually for this migration)

But is it possible to set field properties by code as well?

Ideally I would export fields with their properties from database A and import them with these properties for migration purposes into database B.

As I found no way to set properties while creating fields via the fields table I have to manually created Option Fields as I can't set the Option Strings.

Hope someone knows an answer.
Karsten Frank
MCP - Dynamics NAV Developer

Comments

  • companycompany Member Posts: 89
    Hi,

    I have tried to create the table by code (not manually) but i got an error message ' Tabledata **** doesnot exist'..

    can you please tel me the process how to create the table by code.

    thanks in advance.
  • tinoruijstinoruijs Member Posts: 1,226
    I guess you mean a temporary table?

    Take a look at the following post: http://www.mibuso.com/forum/viewtopic.php?t=11782

    Or http://www.mibuso.com/forum/viewtopic.php?t=24537 and read the reply of jlandeen.[/url]

    Tino Ruijs
    Microsoft Dynamics NAV specialist
  • kinekine Member Posts: 12,562
    You can try to use C/Front (if you have a appropriate granule for that) and call it within NAV to be able to create new table with fields within NAV. C/Front has functions for that...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • karstenrobertkarstenrobert Member Posts: 27
    Hi,

    If I get that right. It is possible to create fields(with properties like "option string") and tables by using C/Front?
    Karsten Frank
    MCP - Dynamics NAV Developer
  • FranVLCFranVLC Member Posts: 22
    company wrote:
    Hi,

    I have tried to create the table by code (not manually) but i got an error message ' Tabledata **** doesnot exist'..

    can you please tel me the process how to create the table by code.

    thanks in advance.

    I'm trying to do that, too! Any help? ](*,)
    Thank you very much to all users who actively participate in this forum!
  • kinekine Member Posts: 12,562
    just look into the C/Front demo application (file sample.c). There is function verifyCreateTable.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • FranVLCFranVLC Member Posts: 22
    kine wrote:
    just look into the C/Front demo application (file sample.c). There is function verifyCreateTable.

    Thanks, i'll see that function. :)
    Thank you very much to all users who actively participate in this forum!
Sign In or Register to comment.