Options

Importing objects (fob) from code

EvREvR Member Posts: 178
Hi all,

I want to write an update routine to import a fob file from within NAV. Is this possible in native c/al without running an external powershell command?
I need to have an easy way for the end user to update an add-on solution to the latest version. The fob will never contain standard NAV objects, just objects in our own add-on range.

Gr, Erik

Best Answer

Answers

  • Options
    krikikriki Member, Moderator Posts: 9,096
    Easy: since NAV2013 you can import/export fobs/text into/out of NAV. Exporting texts only if your current license enables it. The problem is that you can't specify a license to use for the import/export. But for the rest you can specify all with parameters. I am using this feature heavily for some versioning.

    Ex:
    C:\xxxxxxxx\finsql.exe ntauthentication=1, nettype=TCP, command=exportobjects, servername="Your Server", database="Your Database", logfile="C:\TEMP\log.txt", filter="Type=Page;ID=50173", file="C:\xxx\xxx\xxx\T0000050173.TXT'
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • Options
    EvREvR Member Posts: 178
    edited 2016-07-26
    Thanks, I know the import functionality in the dev client.
    But I'm talking about importing from actual c/al code. So that an end user can update his own solution straight from an RTC action. This action will then automatically download the latest fob from our online repository (no problem technically) but then the fob has to be applied to the database without powershell or use of the dev client.
  • Options
    archer89archer89 Member Posts: 337
    you can run above command in c/al using .net class system.process.
    best regards
    Franz Kalchmair, MVP
    Alias: Jonathan Archer

    please like / agree / verify my answer, if it was helpful for you. thx.
    Blog: http://moxie4nav.wordpress.com/
  • Options
    EvREvR Member Posts: 178
    But then you still need to dev client and it's not cloud-proof.
    I was hoping there was a native c/al method to do this but I guess there isn't. Maybe soon when Dynamics 365 takes off with its app store :smile:
Sign In or Register to comment.