Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

set number for run workflow

(0) ShareShare
ReportReport
Posted on by

Hi dear friends,

I want to set number in the field, and run workflow base on that number. for example, if I set 2 in the field. the workflow shold creates two activities. Is there any way?!

*This post is locked for comments

  • RE: set number for run workflow

    Hi Francesco, your solution makes me happy, now I have one problem, How I can Schedule these service activity by time? for example, first service activity start field is today, second is next 3 month,...

  • Verified answer
    RE: set number for run workflow

    Hi roya_khalil,

    you can achieve your goal with a simple trick.

    1) we name your number field as "Workflow number"

    2) create a new field "Workflow number created"

    3) create a child process workflow, we name "Child WF" which:

    a) check if Workflow number created < Workflow number

    b) if true it will increase Workflow number created by 1 and will recall Child WF

    c) if false it will stop

    4) create a main workflow to call Child WF which start when "Workflow number" changed

    Please let me know if you solve.

    If you found the answer helpful, please mark as Verified 

    Join my network on LinkedIn      Follow me on Twitter 

    Thank You & Best Regards

    Francesco Picchi

    Microsoft Dynamics CRM Consultant, Bologna+Milano, ITALY

    Independent Contractor

    http://www.francescopicchi.com

  • Suggested answer
    Aric Levin Profile Picture
    Aric Levin 30,188 Moderator on at
    RE: set number for run workflow

    Hi, You can create an action that will create an activity record.

    In JavaScript you add code to call the action the number of based on the value of that field.

    You can use process.js to call the action, or webapi.

    Hope this helps.

  • Suggested answer
    Radu Chiribelea Profile Picture
    Radu Chiribelea 6,667 on at
    RE: set number for run workflow

    Hi Roya - i don't think that iteration is possible with the out of the box workflows. 

    Probably some custom code will get you where you want to be - like for example

    int value = entity["field"]
    
    for (int i = 0; i<value; i++)
    {
    Entity mailActivity = new Entity("mail");
    service.Create(mailActivity);
    }

    see some other similar community posts: 

    community.dynamics.com/.../727269;

    https://community.dynamics.com/crm/f/117/t/259191 

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

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

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,436 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans