Import Objects with C/FRONT.dll (>= NAV 5.01)

garakgarak Member Posts: 3,263
edited 2008-10-20 in NAV Tips & Tricks
Hi, i've tested the new C/Front.dll for NAV 5.01 (5.00 SP1) and i saw there 2 new nice functions.

The first nice is
ExportFOB()
the second one is
ImportFOB()

With both you can export / import binary files.

So, for example with
CFrontDotNet.Instance.ExportFOB("Drive:\\Folder\\YourExportFobFile.fob","WHERE(Type=CONST(Form),ID=FILTER(10..15))");

you can export all objects (in the example form 10..15) to your specific folder.

With
NavisionImportMode ImportMode;

ImportMode = NavisionImportMode.Overwrite;

CFrontDotNet.Instance.ImportFOB("Drive:\\Folder\\YourExportFobFile.fob",ImportMode);

you import the objects.

The return value of ExportFob is Void. But ImportFob return a String with the imported objects.

Regards
Do you make it right, it works too!

Comments

  • ara3nara3n Member Posts: 9,256
    It would be nice if had ExportObjectAsText.


    My guess they have added that for LS Retail Object replication feature they have to replicate objects to Stores.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • garakgarak Member Posts: 3,263
    yes but i can also transfer the blob to the object table and NAV creates the objects (tables incl. SIFT tables) self.
    Do you make it right, it works too!
  • ara3nara3n Member Posts: 9,256
    Right, but it's not supported.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • petergnresoundpetergnresound Member Posts: 4
    Hi

    What is the version of your CfrontDotNet.DLL ?
    Mine is version 5.0.24199 and it don't seem to have these Import/export functions

    Best regards

    Peter
Sign In or Register to comment.