Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum
Answered

Any idea on how to rewrite Async workflow to MS Flow/Power Automate?

Posted on by Microsoft Employee

Hello,

I need to convert following to MS Flow/Power Automate or Sync WF. Classical Sync WF doesn't achieve what's it meant for. Any ideas?

pastedimage1641869333822v1.png

Thanks in advance

Nikhil

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Any idea on how to rewrite Async workflow to MS Flow/Power Automate?

    Thank you so much. I got it working with below expression CRM.LookupLogicalName

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Any idea on how to rewrite Async workflow to MS Flow/Power Automate?

    Hi Niku123,

    As I mentioned above, the opportunity/lead exists on the two connection records in the "Connected to" and "Connected from" fields respectively.

    In my original example, i only get the opportunity from "Connected to" field, so another connection that opportunity is "Connected from" will run failed.

    so you need add condition to specify it's type before 'Get a row by ID' action:

    pastedimage1642042110640v1.png

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Any idea on how to rewrite Async workflow to MS Flow/Power Automate?

    Thanks Leah, your reply is much appreciated and v.much inline on what I wanted.

    However for me, there is also Lead entity which needs to fit in power automate - may be parallel branch. As you know with both lead and opportunity(inclusive), there would be 4 connections created(overall) and they go in inactive status with the flow but the flow run itself keeps failing all four times with error as "Opportunity with id doesn't exist" and "Lead with id doesn't exist".

    Any inputs?

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Any idea on how to rewrite Async workflow to MS Flow/Power Automate?

    Hi Niku123,

    1.how we can reference in Power Automate:

    You can use 'Get a row by ID' action to get parent records based on of lookup fields.

    pastedimage1641952680537v1.png

    Then you can get information of opportunity from the step:

    pastedimage1641953173981v2.png

    2. both two connections created should be in inactive status:

    When you create connections between contact and opportunity, two connections can be created automatically,They correspond to each other in the Connected from and Connected to fields, which means that the contact is 'Connected to' in one connection and 'Connected from' in another connection.

    pastedimage1641953657428v3.png

    pastedimage1641954304892v4.png

    But conditions you provided limit the 'Connected from' field must be contact and 'Connected  to' field must be opportunity/lead, so only one connection satisfy these conditions, another does not to the extent that it's status can't be change.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Any idea on how to rewrite Async workflow to MS Flow/Power Automate?

    Thanks all for your replies however given the same, here it's a complete picture;

    Following are my conditions used in WF

    pastedimage1641939461399v1.png

    and here it's a complete WF

    pastedimage1641939624315v2.png

    so basically ask here is I need to convert to real time WF which can be done on ribbon button click, I also know that however I want

    "Lead and application should not be listed as connections of contact from qualified lead" which means both two connections created should be in inactive status. Right now, one record remains in active status while other goes in to inactive status.

    Also, I need to know how we can reference in Power Automate  - let's say for e.g. Connected To(Opportunity) from Connections entity when record is created. One might call them as related entity.

    I hope it's clear now.

    Thanks

    Nikhil

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,962 Moderator on at
    RE: Any idea on how to rewrite Async workflow to MS Flow/Power Automate?

    Hi,

    have you tried deactivating and converting it to Real time workflow by clicking on ribbon button?

    Only wait & Timeout is not supported in Classic sync workflow. Apart from this it should be easy to convert to sync workflow.

    Please provide the screenshot of whole workflow to replicate it into MS flow/power automate.

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Any idea on how to rewrite Async workflow to MS Flow/Power Automate?

    Hi Niku123,

    You can convert Async workflow to Sync workflow through the 'Convert to a real-time workflow ' button:

    pastedimage1641886350319v1.png

    "Classical Sync WF doesn't achieve what's it meant for."

    What is the purpose of this workflow and can you provide a specific scenario?

    And you can use 'Condition' and 'Update a row' actions to replace steps that showed in the screenshot.

    pastedimage1641887378037v2.png

    Can you provide more details about the original workflow(trigger, other steps..)?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,564 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,651 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans