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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 19.03.2019, 23:13   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
everythingdynamicsaxbi: How to: Successfully enable Business Events in D365FO
Источник: http://www.everythingdynamicsaxbi.co...nts-in-d365fo/
==============

With the release of PU24 we finally can use Business Events! It’s not enabled out of the box, but with a bit of configuration you can have it up and running in no time. Lets take a look!

Prerequisites

  • Business events are available in Platform update 24 and later
How to enable Business Events for non-production environments

For Production environments you have to log a support case with Microsoft

1. Log on to your VM, open up SQL Management Studio and run the following SQL-statement:

INSERT INTO SYSFLIGHTING (FLIGHTNAME, ENABLED, FLIGHTSERVICEID) VALUES (‘BusinessEventsMaster’, 1, 12719367)



2. Verify that this line has beed updated with the following information in the web.config file:



3. Perform iisreset



4. Go back to the D365FO client and open up the Business Events form (System Administration -> System Parameters -> Business Events – Preview)

5. Click “Yes” to enable Business events





Using Business Events with Microsoft Flow

So let’s set up a scenario where we can actually use the Business events. Inside the Business Events catalog there are multiple events defined by Microsoft that are ready to be used. I started out using the SalesInvoicePostedBusinessEvents which is triggered when a user posts a sales order invoice. Using business events and Microsoft Flow I want get a notification on my phone and an email when a user posts an invoice. The setup is fairly easy. I’ll show you how.

1.First we will start by downloading the schema for the event.



Then head over to https://www.jsonschema.net/ and copy/paste the JSON from the file into the left column (This will make Microsoft Flow able use each data element separately). Click the Infer Schema button and click the middle button in the right side of the page to remove line numbers and copy the script:



2. Now we will create our Flow. D365FO will send information to our Flow so we will need a “When a HTTP request is received” trigger (This is an incoming API call that could use actions in a Logic App or other API to trigger this flow) to actually start the Flow. Log on to Microsoft Flow and create a new Flow from blank and add the trigger. Insert the copied JSON schema and set the method to “Post”:



3. As I want to be informed on my phone and via email I need to create a Parallel branch so that I will be notified simultaneously. Here I can add some Dynamic content like InvoiceId, InvoiceAccount and Sales Order Id. Basically any of the information that I get from the Business Event:



4. My finalized Flow looks like this:



5. Hit Save and copy the HTTP POST URL:



6. Then go back to D365FO and configure a new endpoint:



7. Select Microsoft Flow, insert your URL and hit OK:



8. Activate the Business Event, chose the legal entity and select your newly created endpoint:



9. Go ahead and post an invoice from a sales order. Then go back to the System Parameters and start the Business Event Batch job:



10. After a little while I get a notification in the Flow app and an email telling me that the invoice has been posted:



11. Also, I can go back to my Flow and see that it ran successfully:



Summary

Business Events can be used in so many different scenarios and I personally think this is one of the coolest new features for D365FO! There’s a lot of new features in PU24 and Application update 10, to much to even go through, but I just want to include a screenshot of the new user interface for Finance and Operations which is now more streamlined with the other Microsoft applications (Good job Microsoft :)):





As always, feel free to use the comment section below or send me an email!

Also, a big thanks to this blog for showing me the handy feature of the JSON Schema Tool!



Источник: http://www.everythingdynamicsaxbi.co...nts-in-d365fo/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Navigate Into Success: How do I: Really set up Azure Active Directory based authentication for Business Central APIs Blog bot NAV: Blogs 0 17.02.2019 04:43
alexef: How to add a field to Item Card in Business Central Blog bot NAV: Blogs 0 22.05.2018 20:11
axsa: How to transform an automated business process into an intelligent business process using Dynamics and Azure ML Blog bot DAX Blogs 1 29.10.2014 15:10
atinkerersnotebook: Walkthrough & Tutorial Summary Blog bot DAX Blogs 1 09.09.2013 09:11
Опции темы Поиск в этой теме
Поиск в этой теме:

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

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

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

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