Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Do Until Condition Not Working --- Using Dynamics 365 Invoices

(0) ShareShare
ReportReport
Posted on by 5

Hello,

 

I have an automated work flow that triggers when a certain products are invoiced in Dynamics 365 CRM, a corresponding number of custom "assignment code" records are created.

 

The workflow works if there is only 1 quantity associated with an invoice, but when there's more than 1 product, the Do Until condition isn't met so the Do Until flow continues to create custom assignment code records until it hits the limit.

 

In other words:

x# of Product Y Invoiced = Create x# of Custom Assignment Code Records

 

The workflows works when there with only one product sold/invoiced. When there is more than one (corporate), then the Do Until Quantity Condition is never met, so it creates codes until the Limits are reached. 

 

Here is the Flow:

 

part-1.PNGpart2.PNGpart3.PNG

 

Everything works fine until we reach the bottom right - the Do Until condition. Here is it zoomed in:

do-until.PNG

I appreciate your help. Thank you.

 

  • Adil365 Profile Picture
    5 on at
    Re: Do Until Condition Not Working --- Using Dynamics 365 Invoices

    Hi ManishJain, I added a Set Variable in the Apple Each section and that fixed my issue. Thank you!

  • Verified answer
    MJain Profile Picture
    2,450 on at
    Re: Do Until Condition Not Working --- Using Dynamics 365 Invoices

    Hi @adilnaj ,

     

    Have you set degree of concurrency to the top Apply to each (parent to do until loop) . If yes then setting variable inside the concurrent loops will not work for you . You need to use compose action.

     

    https://toonvanhoutte.wordpress.com/2018/02/20/variables-in-parallel-for-each-loops/comment-page-1/?unapproved=1683&moderation-hash=5f4f1344ca2bd3811f02d4274b59f9bc#comment-1683

     

    Thanks

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,635 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow