Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Unanswered

Real Time workflow triggering after complete batch of execute multiple runs

Posted on by 1,329

Hi,

Folks and experts...

Have a problem implementing the scenario...with execute multiple and custom workflow..

Have one config value -- Max order Count -- single line of text

If we set Max Order Config value to 2, Max Order Count Reached field should be set to 'No' for the first order placed and second and future orders should be updated with Max. Order Count Reached Flag = 'Yes'.

The records were getting created using Execute multiple request using batch program. Used a custom real time workflow for this..but the flag is not updating properly..

Issue: If we set the config value = 1, with no other orders today, we place two orders now, the Max Order Count field is getting set on both the orders placed. However the Max Order Count Reached Flag should be set to 'No' for first order and 'Yes' for second order.

I could note from back end that the records are getting created with 2 seconds time gap(ie second record created after 2 secs of first record creation)...but it seems like after both the records are getting created only custom workflow is getting triggered.

Kindly help me to know if any CRM Operation(like triggering workflow) when Execute Multiple Requests are running in the transaction..or any other approach..else real time workflow must be triggered after first record gets created and update flag to 'No'.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Real Time workflow triggering after complete batch of execute multiple runs

    NEVER use ExecuteMultipleRequest inside a plugin is just common sense.  The whole request/response model is about one at a time.  Only use this within executable utilities -- Windows or command line.

    AND I would also suggest that best practice is to NEVER modify data inside a workflow assembly.  These should ALWAYS be limited to data fetching calculations and queries.  In my book, simply poor programming.

  • erhan.keskin Profile Picture
    erhan.keskin 2,247 on at
    RE: Real Time workflow triggering after complete batch of execute multiple runs

    Just worth to read if you haven't;

    ExecuteMultiple & Workflow or Plugin Assemblies: www.inogic.com/.../

    TIL: Do not use ExecuteMultipleRequest in Dynamics 365 Plugins/CWA: community.dynamics.com/.../til-do-not-use-executemultiplerequest-in-dynamics-365-plugins-cwa

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans