Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Relating two entities in a workflow dynamics CRM 365

(0) ShareShare
ReportReport
Posted on by 676

Hi,

I am creating an approval process. In the workflow I create a new approval. Now I want to embed the link of this created approval into an email. So that the assigned user is able to open it from the email itself. Till the approval happen I put the workflow on 'wait'. Now on the basis of the outcome of the approval, I want to update a field of the primary entity for which this approval was created. What approach should I follow to achieve this?

I would feel glad to have any suggestions on this.

*This post is locked for comments

  • Suggested answer
    TNS Profile Picture
    TNS 1,195 on at
    RE: Relating two entities in a workflow dynamics CRM 365

    Hi,

        If you want to embed the link of created approval into an email for this you have a field name "record url " ..which gives the url of the record which is created .. so in your email template you can set the record url and you can find the link of the record ...

      so for putting your workflow waiting till the approval happen..you might have some status field like .. if status is approved or dispproved ... so you can put a 'Time out ' condition.. like TimeOut  until status approved... so your workflow will wait till status will be approved ..

       then in the next step you can have condition if status is approved update the entity you want to update.

    Thanks!

  • Mohd Tahir Profile Picture
    Mohd Tahir 676 on at
    RE: Relating two entities in a workflow dynamics CRM 365

    Hi Daniel,

    Step 1:

    First I select this step in Dynamics 365 workflow designer to add an approval step:

    Approval2.png

    Step 2:

    I fill the required fields for the approval:

    Approval2.png

    But when I run the workflow no such approval is created on the entity.

  • DanielSturm Profile Picture
    DanielSturm 127 on at
    RE: Relating two entities in a workflow dynamics CRM 365

    Hi Mohd,

    could you kindly screenshot the workflow you've created so far?

  • Mohd Tahir Profile Picture
    Mohd Tahir 676 on at
    RE: Relating two entities in a workflow dynamics CRM 365

    Hi Daniel,

    First thing I am not able to create 'approvals' for an entity using a workflow. I add the action in my workflow 'Create Approval'. Then after I run the workflow, though the status is succeeded I see no approval getting created for the entity.

  • DanielSturm Profile Picture
    DanielSturm 127 on at
    RE: Relating two entities in a workflow dynamics CRM 365

    Hi Mohd,

    let's get this into an order:

    1.Create new approval

    2.Create e-mail, embed link of the created approval.

    3. Put WF on wait till approval is approved or dissapproved.

    4. Update Field in primary entity

    1-2.

    I'd rather suggest you're adding another line into your creation workflow of the new approval to add the dynamic URL for this dataset into a hidden field on the approval. Then you can implement the e-mail sent action on the next step. therefore I'd suggest to use a global e-mail template and add the field with the URL with HTML code as described here: http://www.crmsoftwareblog.com/2015/11/dynamic-values-custom-entities-email-templates/comment-page-1/#comment-259695 Make sure to read the comments below as they're very helpful.Check the link to see how you can create a nice link in your e-mail.

    3. Put in Wait condidition

    4. The entity your workflow is based on should be your "primary" entity. Therefore once step one to three are completed you can check whether it was approved or dissapproved and update your primary entity  correspondingly.

    Hope i could help you out.

    If you have any further question feel free to ask.

    If I did help you with this one make sure to verify my answer.

    Best regards,

    Daniel

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…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

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,407 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans