Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Run a workflow and create a new record when click on the Save button

Posted on by

Hi All,

I want to move two fields value form contact entity to custom entity called committehistory.

What I have done

1. create two fileds in Contact entity called HistoryMemberOf and HistoryMemberTitle

2. then create two WF, One is to update the HistoryMemberOf when the OrgName field changed

                                 Second is to update the historyMemberTitle  when the MemberTitle field changed

3. the reason creating two WF is, user may change only one field or may change both field at once, so I think I need two WF in this case, Is that right?

4.Then what I want to do is, when the user click on the Save button on contact  form, I want to create a new record in committehistory entity based on  these temp fields- to do this I have created a WF as shown below with- create record step and the wf start option is "Record is Created" is this correct?

2703.wf.png

But when I click on the Save button new record doesnt create in committehistory entity. But the other two work flows are working ok.

5. Can someone please help me to tranfer these two temp data to committehistory entity as a new record. 

6. How can I tell this new record creating WF starts after finish the first two finish only, also only when the HistoryMemberOf filed and HistoryMemberTitle   change, otherwise every time someone click the Save button it will create a new record in the other entity.

see how assign value to committehistory

his.png

I m using Dynamics 365. 

Thanks. 

*This post is locked for comments

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Run a workflow and create a new record when click on the Save button

    Hi Dineth,

    please proceed as follows:

    1. On Contact entity, create an attribute to hold a OrganizationalMemberHistory lookup
    2. Worflow 1:
      1. Entity: Contact
      2. Scope: Organization (is you set user, it will be valid only for you!)
      3. Start when: Record is created
      4. Steps:
        1. Create  OrganizationalMemberHistory (set all fields you need from contact)
        2. Set the OrganizationalMemberHistory attribute on Contact (see point 1) with OrganizationalMemberHistory record just created
    3. Workflow 2:
    4. Entity: Contact
      1. Scope: Organization (is you set user, it will be valid only for you!)
      2. Start when: Records fields change (include all contact fields you need as source for OrganizationalMemberHistory record, same fields you set at point 2.4.1
      3. Steps:
        1. Update OrganizationalMemberHistory (set all contact fields you need as source for OrganizationalMemberHistory record, same fields you set at point 2.4.1)

    Please, let me know.

    If you found the answer helpful, please mark as Verified 

    Thank You & Best Regards

    Francesco Picchi

    Microsoft Dynamics CRM Consultant, Bologna, ITALY

    Independent Contractor

    http://www.francescopicchi.com

  • Suggested answer
    sandeepstw Profile Picture
    sandeepstw 4,601 on at
    RE: Run a workflow and create a new record when click on the Save button

    Hi,

    Create a custom workflow manage all condition there and then attached to process workflow. Hope this article helps -

    mahenderpal.wordpress.com/.../step-by-step-creating-custom-workflow-in-microsoft-crm-2011

    Thanks,

    Sandeep

  • Dineth Profile Picture
    Dineth on at
    RE: Run a workflow and create a new record when click on the Save button

    Sorry forgot to mentioned I m using Dynamics 365 online

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,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans