Importing objects (fob) from code
EvR
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
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
0
Best Answer
-
you could import the fob using powershell cmdlet.
for running powershell cmdlet out from c/al follow
http://www.waldo.be/2014/12/17/running-powershell-from-nav/
http://forum.mibuso.com/discussion/61730/nav-2013r2-running-powershell-script-from-c-al-code
for importing objects with powershell follow
http://www.waldo.be/2014/04/09/nav-2013-r2-import-objects-with-powershell/
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/5
Answers
-
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!0 -
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.0 -
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/0 -
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
0 -
you could import the fob using powershell cmdlet.
for running powershell cmdlet out from c/al follow
http://www.waldo.be/2014/12/17/running-powershell-from-nav/
http://forum.mibuso.com/discussion/61730/nav-2013r2-running-powershell-script-from-c-al-code
for importing objects with powershell follow
http://www.waldo.be/2014/04/09/nav-2013-r2-import-objects-with-powershell/
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/5
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 324 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
