AXForum  
Вернуться   AXForum > Microsoft Dynamics NAV > NAV: Blogs
NAV
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 27.08.2018, 05:13   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
waldo: Export C/AL objects as AL from a database on a docker container on a remote host
Источник: https://dynamicsuser.net/nav/b/waldo...-a-remote-host
==============

That’s a mouthful, isn’t it :-)?

As you might have figured in quite some sessions, threads and posts, I’m quite fond running docker images on a remote Hyper-V on my laptop. From the moment it was described by Arend Jan, I’m using it. In my opinion, it’s a much better way to run, because Windows Server is so much better in memory management as Windows 10 is (in regards of Docker that is).

But…

And let’s not quote Ed Stark here ;-). A disadvantage of working like this is that you have to “remote” PowerShell in two machines:
  • The dockerhost
  • The container
That why I created new PowerShell modules – just to make that a bit easier. I described it earlier this year here.

Txt2al

I shouldn’t tell you about the txt2al conversion tool. It’s the tool that converts txt-files to al. Obviously, this tool is part of normal the NAV environment, so after Freddy already created some functions in the navcontainerhelper to be able to use the tool from a docker host – I created my own function to do that for a remote dockerhost ;-).

I think there are two scenarios where this tool is useful:
  • The obvious: convert your app from C/AL to AL. In that case, it means you need to convert your modifications (your DELTA-files) to al … Which means you need originals/modified objects/generate deltas/convert to AL. Luckily there is a very useful commandlet in the navcontainerhelper: “Convert-ModifiedObjectsToAl”.
  • But also: why not just convert an existing object to al – as if it just to see how it would look like, or to be a starting point for you to start your own object. Like if you want to create your own version of a role center or a report.
Export-RDHNAVApplicationObjectsAsAL

That’s why I created the function “Export-RDHNAVApplicationObjectsAsAL” and made that part of the “CRS.RemoteNAVDockerHostHelper” module on the PowerShell Gallery.

And it turns out I use it all the time :-). Here is just one example where I can export all reports as AL.

$containerName = 'devpreview'$Path = 'C:\Temp\Reports'$result = Export-RDHNAVApplicationObjectsAsAL ` -DockerHost $DockerHost ` -DockerHostCredentials $DockerHostCredentials ` -DockerHostUseSSL:$DockerHostUseSSL ` -DockerHostSessionOption $DockerHostSessionOption ` -ContainerName $containerName ` -Path $Path ` -extensionStartId 50000 ` -filter 'Type=3' #All Reports






Источник: https://dynamicsuser.net/nav/b/waldo...-a-remote-host
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
sp-nav-tech: Export and Split Navision objects using Windows PowerShell in NAV 2015 Blog bot NAV: Blogs 0 16.08.2017 17:11
waldo: Convert C/AL Objects to AL with PowerShell Blog bot NAV: Blogs 0 05.05.2017 03:33
Microsoft Dynamics CRM Team Blog: Auditing Report Execution using the ReportServer Database Blog bot Dynamics CRM: Blogs 0 19.11.2008 20:05
msdynamicsax: Upgrading a database from Ax 4.0 SP1 to Ax 2009 Blog bot DAX Blogs 1 13.08.2008 14:02
Microsoft Dynamics CRM Team Blog: Accessing a SQL Database from a Microsoft Dynamics CRM Plug-in Blog bot Dynamics CRM: Blogs 0 14.07.2008 13:05
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 00:15.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.