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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 30.06.2020, 07:17   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
crmtipoftheday: Tip #1372: Synchronous Power Automate Flow on create/update of a record
Источник: https://crmtipoftheday.com/1372/sync...te-of-a-record
==============

Today’s tip is indirectly from Alex Shlega. Alex is very thorough in his writing so I was a bit surprised that his answer to running a synchronous flow from a webhook was a ‘no’. The reason cited was that
CDS “execution pipeline” won’t wait for the Flow completion.

Well, it will indeed not, but only because we need tell it that we are going to return something. The moment you add a Response action, the webhook becomes synchronous.

There is a catch, of course. If you update the same record in your flow, you will enter a loop. And you will enter it from a separate process whilst blocking your original request. It means you can’t break that loop if you update the same record. The original update waits for the flow to complete but the flow can’t complete because it waits for the original update to release the record so that the flow can update it. Which is a classic deadlock.

In short, if you update the same record then no matter what you do, the original update will fail.

However, if you update does not touch the same record or entity then it will work. To illustrate, I added a calculated field to the account entity that displays main telephone of the primary contact. Registered the flow as a webhook and included pre-image with the primarycontactid:


Inside the flow I update the primary contact record with the +1 :


The end result? Primary contact record is updated very much synchronously:

Synchronous update of the primary contactIs synchronous flow possible? Yes, it is. Is a good idea? With the deadlock and infinite loop on the cards, it is probably not.

Cover photo: Waiting for Godot, text by Samuel Beckett, staging by Otomar Krejca. Avignon Festival, 1978. Rufus (Estragon) and Georges Wilson (Vladimir) / photographs by Fernand Michaud / CC0



Источник: https://crmtipoftheday.com/1372/sync...te-of-a-record
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
saurav-nav: NAV 2018 - Lots of New Objects! Blog bot NAV: Blogs 0 04.12.2017 10:11
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 15 Blog bot Dynamics CRM: Blogs 1 10.02.2016 10:26
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 17 Blog bot Dynamics CRM: Blogs 0 10.05.2014 06:30
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 16 Blog bot Dynamics CRM: Blogs 0 23.01.2014 03:15
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 13 Blog bot Dynamics CRM: Blogs 0 27.03.2013 22:12
Опции темы Поиск в этой теме
Поиск в этой теме:

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

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

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

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