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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 14.06.2017, 04:17   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
waldo: AL with VSCode: Run Extension Objects (with PowerShell)
Источник: https://dynamicsuser.net/nav/b/waldo...ith-powershell
==============

Some time ago, Mark blogged an interesting article about running objects from extensions. You can read it here: https://markbrummel.blog/2017/05/20/...nsion-objects/ .

It made me wonder .. how would I solve this? And one of the problems of asking myself these kind of questions is .. the answer is always the same :-/:

Powershell

And apperantly, I already blogged something really similar as well :-):

http://www.waldo.be/2015/07/09/start...th-powershell/

I created some functions in my module to be able to run objects in a windows client. This enables me to do something like this:
Running a codeunit:

Start-NAVApplicationObjectInWindowsClient ` -ServerInstance NAV ` -ObjectType Codeunit ` -ObjectID 70000000Running a table:

Start-NAVApplicationObjectInWindowsClient ` -ServerInstance NAV ` -ObjectType table ` -ObjectID 70055050Works like a charm for Extension objects as well :-).

What about the Web Client?

Well .. Duh ;-). Only, the Web Client only supports to be able to run a Page or a Report. So in the latest version of my Powershell-modules, I included a function to support that: Start-NAVApplicationObjectInWebClient.

It’s very the same as the other Start-function – here is an example:



Start-NAVApplicationObjectInWebClient ` -WebServerInstance DynamicsNAV100 ` -WebClientType Tablet ` -ObjectType Page ` -ObjectID 700500000You can see it supports also running the tablet client and the phone client. How easy can it get?

So, I need to have a new project with powershell-stuff to combine with my AL development?

Most certainly not! You can easily combine powershell-scripts with al-development! Just take this screenshot as an example:



This is just a simple example where I included a PowerShell-script in a subfolder of the workspace of an al-project. It keeps being an al-project (mind the “launch.json”, but I’m able to execute Powershell as part of the workspace. Not with F5, but with F8 (execute the selection).

How do i make your modules available on my system

Making my modules available on your machine you can do simply by installing them from the PowerShell Gallery by executing this :

Find-Module | where author -eq waldo | install-module

Enjoy!




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

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
waldo: AL with VSCode: Symbol Rename Blog bot NAV: Blogs 0 22.05.2017 05:12
mark_brummel: Tip #58 | Run Extension Objects Blog bot NAV: Blogs 0 20.05.2017 15:16
waldo: Convert C/AL Objects to AL with PowerShell Blog bot NAV: Blogs 0 05.05.2017 03:33
waldo: Microsoft Dynamics NAV 2017 – what’s really new? Blog bot NAV: Blogs 0 13.10.2016 05:22
Ошибка бизнес-процесса Tarasov E Dynamics CRM: Разработка 9 18.02.2010 14:02
Опции темы Поиск в этой теме
Поиск в этой теме:

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

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

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

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